use of org.jaffa.presentation.portlet.FormKey in project jaffa-framework by jaffa-projects.
the class UserLookupAction method do_CreateFromResults_Clicked.
// .//GEN-END:_do_CreateFromCriteria_Clicked_4_be
// .//GEN-BEGIN:_do_CreateFromResults_Clicked_1_be
/**
* Invokes the createFromResults() method on the component.
* @return The FormKey for the Create screen.
*/
public FormKey do_CreateFromResults_Clicked() {
FormKey fk = null;
// .//GEN-END:_do_CreateFromResults_Clicked_1_be
// Add custom code before processing the action //GEN-FIRST:_do_CreateFromResults_Clicked_1
// .//GEN-LAST:_do_CreateFromResults_Clicked_1
// .//GEN-BEGIN:_do_CreateFromResults_Clicked_2_be
UserLookupForm myForm = (UserLookupForm) form;
UserLookupComponent myComp = (UserLookupComponent) myForm.getComponent();
try {
// .//GEN-END:_do_CreateFromResults_Clicked_2_be
// Add custom code before invoking the component //GEN-FIRST:_do_CreateFromResults_Clicked_2
// .//GEN-LAST:_do_CreateFromResults_Clicked_2
// .//GEN-BEGIN:_do_CreateFromResults_Clicked_3_be
fk = myComp.createFromResults();
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Create 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.FormKey in project jaffa-framework by jaffa-projects.
the class TaskFinderAction method do_CreateFromResults_Clicked.
/**
* Invokes the Maintenance component.
* @return The FormKey for the Maintenance screen.
*/
public FormKey do_CreateFromResults_Clicked() {
FormKey fk = null;
TaskFinderForm myForm = (TaskFinderForm) form;
TaskFinderComponent myComp = (TaskFinderComponent) myForm.getComponent();
try {
fk = myComp.createFromResults();
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Refresh 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.FormKey in project jaffa-framework by jaffa-projects.
the class TaskFinderAction method do_PauseScheduler_Clicked.
/**
* Pauses the scheduler and refreshes the screen.
* @return The FormKey for the Results screen.
*/
public FormKey do_PauseScheduler_Clicked() {
FormKey fk = null;
TaskFinderForm myForm = (TaskFinderForm) form;
TaskFinderComponent myComp = (TaskFinderComponent) myForm.getComponent();
try {
myComp.pauseScheduler();
fk = myComp.displayResults();
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("PauseScheduler 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.FormKey in project jaffa-framework by jaffa-projects.
the class TaskFinderAction method do_Rows_Activate_Clicked.
/**
* Invokes the activateTask() method on the component.
* @param rowNum The selected row on the Results screen.
* @return The FormKey for the Update screen.
*/
public FormKey do_Rows_Activate_Clicked(String rowNum) {
FormKey fk = null;
TaskFinderForm myForm = (TaskFinderForm) form;
TaskFinderComponent myComp = (TaskFinderComponent) myForm.getComponent();
GridModel model = (GridModel) myForm.getRowsWM();
GridModelRow selectedRow = model.getRow(Integer.parseInt(rowNum));
if (selectedRow != null) {
try {
myComp.activateTask((java.lang.String) selectedRow.get("scheduledTaskId"));
fk = myComp.displayResults();
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Activate Task 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.FormKey in project jaffa-framework by jaffa-projects.
the class TaskFinderAction method do_Refresh_Clicked.
/**
* Re-executes the search, using the same criteria as used before. It invokes the displayResults() method on the component.
* @return The FormKey for the Results screen.
*/
public FormKey do_Refresh_Clicked() {
FormKey fk = null;
TaskFinderForm myForm = (TaskFinderForm) form;
TaskFinderComponent myComp = (TaskFinderComponent) myForm.getComponent();
try {
fk = myComp.displayResults();
} catch (ApplicationExceptions e) {
if (log.isDebugEnabled())
log.debug("Refresh 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;
}
Aggregations