use of org.jaffa.presentation.portlet.widgets.model.GridModel in project jaffa-framework by jaffa-projects.
the class BusinessEventLogViewerForm method getRelatedAttachmentWM.
// .//GEN-END:_2_be
// .//GEN-BEGIN:RelatedAttachment_1_be
/**
* Getter for property Attachment. This is invoked by the custom tag, when the jsp is rendered, to get the current value.
* This gets the current data from the component.
* @return Value of property attachment.
*/
public GridModel getRelatedAttachmentWM() {
GridModel rows = (GridModel) getWidgetCache().getModel("relatedAttachment");
if (rows == null) {
rows = new GridModel();
populateRelatedAttachment(rows);
getWidgetCache().addModel("relatedAttachment", rows);
}
return rows;
}
use of org.jaffa.presentation.portlet.widgets.model.GridModel in project jaffa-framework by jaffa-projects.
the class MessageViewerForm method getHeadersWM.
/**
* Getter for property headers. This is invoked by the custom tag, when the jsp is rendered, to get the current value.
* This gets the current data from the component.
* @return Value of property businessEventLog.
*/
public GridModel getHeadersWM() {
GridModel rows = (GridModel) getWidgetCache().getModel("headers");
if (rows == null) {
rows = new GridModel();
populateHeaders(rows);
getWidgetCache().addModel("headers", rows);
}
return rows;
}
use of org.jaffa.presentation.portlet.widgets.model.GridModel in project jaffa-framework by jaffa-projects.
the class QueueViewerAction method do_RelatedQueueHeader_Delete_Clicked.
public FormKey do_RelatedQueueHeader_Delete_Clicked(String rowNum) {
FormKey fk = null;
QueueViewerForm myForm = (QueueViewerForm) form;
QueueViewerComponent myComp = (QueueViewerComponent) myForm.getComponent();
try {
// This will stop double submits
performTokenValidation(request);
GridModel model = (GridModel) myForm.getRelatedQueueHeaderWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null)
fk = myComp.deleteMessage((java.lang.String) selectedRow.get("messageId"));
// Invoke QueueView Listener
myComp.invokeQueueViewerListeners();
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("RelatedQueueHeader_Delete Failed");
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, e);
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
// Direct User back to current form
if (fk == null)
fk = myComp.getViewerFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.widgets.model.GridModel in project jaffa-framework by jaffa-projects.
the class QueueViewerAction method do_RelatedQueueHeader_View_Clicked.
public FormKey do_RelatedQueueHeader_View_Clicked(String rowNum) {
FormKey fk = null;
QueueViewerForm myForm = (QueueViewerForm) form;
QueueViewerComponent myComp = (QueueViewerComponent) myForm.getComponent();
try {
GridModel model = (GridModel) myForm.getRelatedQueueHeaderWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null)
fk = myComp.viewMessage((java.lang.String) selectedRow.get("messageId"));
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("RelatedQueueHeader_View Failed");
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, e);
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
// The Viewer will be rendered in a new window
// We don't want to see the existing HistoryNav in that window
// Hence, initialize the HistoryNav
HistoryNav.initializeHistoryNav(request);
// Direct User back to current form
if (fk == null)
fk = myComp.getViewerFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.widgets.model.GridModel in project jaffa-framework by jaffa-projects.
the class FileExplorerAction method do_FileTree_Download_Clicked.
public FormKey do_FileTree_Download_Clicked(String rowId) {
FileExplorerForm myForm = (FileExplorerForm) form;
FileExplorerComponent myComp = (FileExplorerComponent) component;
GridModel m = (GridModel) myForm.getWidgetCache().getModel("fileTree");
GridModelRow row = m.getRowById(new Integer(rowId).intValue());
File f = (File) row.get("file");
if (f == null || !f.exists()) {
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "message.Jaffa.Admin.FileExplorer.fileNotFound");
return myComp.getCurrentFormKey();
} else {
request.setAttribute("org.jaffa.applications.jaffa.modules.admin.components.fileexplorer", f);
return new FormKey("jaffa_admin_fileExplorer_download", null);
}
}
Aggregations