use of org.jaffa.presentation.portlet.widgets.model.GridModelRow in project jaffa-framework by jaffa-projects.
the class TaskFinderForm method populateRows.
/**
* This will populate the input GridModel with the data in the finderOutDto of the Component.
* @param rows The GridModel object to populate.
*/
public void populateRows(GridModel rows) {
rows.clearRows();
TaskFinderOutDto finderOutDto = ((TaskFinderComponent) getComponent()).getFinderOutDto();
if (finderOutDto != null && finderOutDto.getRows() != null) {
for (TaskFinderOutRowDto rowDto : finderOutDto.getRows()) {
GridModelRow row = rows.newRow();
row.addElement("scheduledTaskId", rowDto.getScheduledTaskId());
row.addElement("taskType", rowDto.getTaskType());
row.addElement("description", rowDto.getDescription());
row.addElement("runAs", rowDto.getRunAs());
row.addElement("startOn", rowDto.getStartOn());
row.addElement("endOn", rowDto.getEndOn());
row.addElement("recurrence", rowDto.getRecurrence());
row.addElement("misfireRecovery", rowDto.getMisfireRecovery());
row.addElement("businessObject", rowDto.getBusinessObject());
row.addElement("createdOn", rowDto.getCreatedOn());
row.addElement("createdBy", rowDto.getCreatedBy());
row.addElement("lastChangedOn", rowDto.getLastChangedOn());
row.addElement("lastChangedBy", rowDto.getLastChangedBy());
row.addElement("nextDue", rowDto.getNextDue());
row.addElement("lastRunOn", rowDto.getLastRunOn());
row.addElement("status", rowDto.getStatus());
row.addElement("lastError", rowDto.getLastError());
row.addElement("failedTaskCount", rowDto.getFailedTaskCount());
row.addElement("hasAdminTaskAccess", rowDto.getHasAdminTaskAccess());
}
}
}
use of org.jaffa.presentation.portlet.widgets.model.GridModelRow in project jaffa-framework by jaffa-projects.
the class UserRequestFinderAction method do_Rows_Update_Clicked.
// .//GEN-END:_do_Rows_View_Clicked_4_be
// .//GEN-BEGIN:_do_Rows_Update_Clicked_1_be
/**
* Invokes the updateObject() method on the component.
* @param rowNum The selected row on the Results screen.
* @return The FormKey for the Update screen.
*/
public FormKey do_Rows_Update_Clicked(String rowNum) {
FormKey fk = null;
// .//GEN-END:_do_Rows_Update_Clicked_1_be
// Add custom code before processing the action //GEN-FIRST:_do_Rows_Update_Clicked_1
// .//GEN-LAST:_do_Rows_Update_Clicked_1
// .//GEN-BEGIN:_do_Rows_Update_Clicked_2_be
UserRequestFinderForm myForm = (UserRequestFinderForm) form;
UserRequestFinderComponent myComp = (UserRequestFinderComponent) myForm.getComponent();
GridModel model = (GridModel) myForm.getRowsWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null) {
try {
// .//GEN-END:_do_Rows_Update_Clicked_2_be
// Add custom code before invoking the component //GEN-FIRST:_do_Rows_Update_Clicked_2
// .//GEN-LAST:_do_Rows_Update_Clicked_2
// .//GEN-BEGIN:_do_Rows_Update_Clicked_3_be
fk = myComp.updateObject((java.lang.Long) selectedRow.get("requestId"));
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Update 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.getResultsFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.widgets.model.GridModelRow in project jaffa-framework by jaffa-projects.
the class UserRequestLookupAction method do_Rows_Update_Clicked.
// .//GEN-END:_do_Rows_View_Clicked_4_be
// .//GEN-BEGIN:_do_Rows_Update_Clicked_1_be
/**
* Invokes the updateObject() method on the component.
* @param rowNum The selected row on the Results screen.
* @return The FormKey for the Update screen.
*/
public FormKey do_Rows_Update_Clicked(String rowNum) {
FormKey fk = null;
// .//GEN-END:_do_Rows_Update_Clicked_1_be
// Add custom code before processing the action //GEN-FIRST:_do_Rows_Update_Clicked_1
// .//GEN-LAST:_do_Rows_Update_Clicked_1
// .//GEN-BEGIN:_do_Rows_Update_Clicked_2_be
UserRequestLookupForm myForm = (UserRequestLookupForm) form;
UserRequestLookupComponent myComp = (UserRequestLookupComponent) myForm.getComponent();
GridModel model = (GridModel) myForm.getRowsWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null) {
try {
// .//GEN-END:_do_Rows_Update_Clicked_2_be
// Add custom code before invoking the component //GEN-FIRST:_do_Rows_Update_Clicked_2
// .//GEN-LAST:_do_Rows_Update_Clicked_2
// .//GEN-BEGIN:_do_Rows_Update_Clicked_3_be
fk = myComp.updateObject((java.lang.Long) selectedRow.get("requestId"));
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Update 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.getResultsFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.widgets.model.GridModelRow in project jaffa-framework by jaffa-projects.
the class PrinterOutputTypeViewerAction method do_RelatedOutputCommand_Update_Clicked.
// .//GEN-END:_2_be
// .//GEN-BEGIN:do_RelatedOutputCommand_Update_Clicked_1_be
/**
* Invokes the updateOutputCommand() method on the component.
* @param rowNum The selected row on the Grid.
* @return The FormKey for the Update screen of the OutputCommand object.
*/
public FormKey do_RelatedOutputCommand_Update_Clicked(String rowNum) {
FormKey fk = null;
// .//GEN-END:do_RelatedOutputCommand_Update_Clicked_1_be
// Add custom code before processing the action //GEN-FIRST:do_RelatedOutputCommand_Update_Clicked_1
// .//GEN-LAST:do_RelatedOutputCommand_Update_Clicked_1
// .//GEN-BEGIN:do_RelatedOutputCommand_Update_Clicked_2_be
PrinterOutputTypeViewerForm myForm = (PrinterOutputTypeViewerForm) form;
PrinterOutputTypeViewerComponent myComp = (PrinterOutputTypeViewerComponent) myForm.getComponent();
GridModel model = (GridModel) myForm.getRelatedOutputCommandWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null) {
try {
// .//GEN-END:do_RelatedOutputCommand_Update_Clicked_2_be
// Add custom code before invoking the component //GEN-FIRST:do_RelatedOutputCommand_Update_Clicked_2
// .//GEN-LAST:do_RelatedOutputCommand_Update_Clicked_2
// .//GEN-BEGIN:do_RelatedOutputCommand_Update_Clicked_3_be
fk = myComp.updateOutputCommand((java.lang.Long) selectedRow.get("outputCommandId"));
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Updator Failed");
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, e);
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
}
// .//GEN-BEGIN:do_RelatedOutputCommand_Update_Clicked_4_be
if (fk == null)
fk = new FormKey(myForm.NAME, myComp.getComponentId());
return fk;
}
use of org.jaffa.presentation.portlet.widgets.model.GridModelRow in project jaffa-framework by jaffa-projects.
the class PrinterOutputTypeViewerAction method do_RelatedOutputCommand_Delete_Clicked.
// .//GEN-END:do_RelatedOutputCommand_Update_Clicked_4_be
// .//GEN-BEGIN:do_RelatedOutputCommand_Delete_Clicked_1_be
/**
* Invokes the deleteOutputCommand() method on the component.
* @param rowNum The selected row on the Grid.
* @return The FormKey for the Delete screen of the OutputCommand object.
*/
public FormKey do_RelatedOutputCommand_Delete_Clicked(String rowNum) {
FormKey fk = null;
// .//GEN-END:do_RelatedOutputCommand_Delete_Clicked_1_be
// Add custom code before processing the action //GEN-FIRST:do_RelatedOutputCommand_Delete_Clicked_1
// .//GEN-LAST:do_RelatedOutputCommand_Delete_Clicked_1
// .//GEN-BEGIN:do_RelatedOutputCommand_Delete_Clicked_2_be
PrinterOutputTypeViewerForm myForm = (PrinterOutputTypeViewerForm) form;
PrinterOutputTypeViewerComponent myComp = (PrinterOutputTypeViewerComponent) myForm.getComponent();
GridModel model = (GridModel) myForm.getRelatedOutputCommandWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null) {
try {
// .//GEN-END:do_RelatedOutputCommand_Delete_Clicked_2_be
// Add custom code before invoking the component //GEN-FIRST:do_RelatedOutputCommand_Delete_Clicked_2
// .//GEN-LAST:do_RelatedOutputCommand_Delete_Clicked_2
// .//GEN-BEGIN:do_RelatedOutputCommand_Delete_Clicked_3_be
fk = myComp.deleteOutputCommand((java.lang.Long) selectedRow.get("outputCommandId"));
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Deletor Failed");
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, e);
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
}
// .//GEN-BEGIN:do_RelatedOutputCommand_Delete_Clicked_4_be
if (fk == null)
fk = new FormKey(myForm.NAME, myComp.getComponentId());
return fk;
}
Aggregations