use of org.jaffa.presentation.portlet.FormKey in project jaffa-framework by jaffa-projects.
the class RolesEditorAction method do_CheckPolicy_Clicked.
/**
* This will re-render the screen with the original values.
* @return the FormKey for this screen.
*/
public FormKey do_CheckPolicy_Clicked() {
FormKey fk = null;
RolesEditorForm myForm = (RolesEditorForm) form;
RolesEditorComponent myComp = (RolesEditorComponent) component;
try {
fk = myComp.runCheckPolicy();
} catch (ApplicationExceptions e) {
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, e);
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
if (fk == null)
fk = myComp.getRolesEditorFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.FormKey in project jaffa-framework by jaffa-projects.
the class RolesEditorAction method do_Save_Clicked.
/**
* Event Handler for the 'Save' clicked event.
* This will copy the values from the Form to the Component and then invoke the performSave() method on the component.
* Finally it'll get the latest file contents of the roles.xml file.
* @return the FormKey for this screen.
*/
public FormKey do_Save_Clicked() {
FormKey fk = null;
RolesEditorForm myForm = (RolesEditorForm) form;
RolesEditorComponent myComp = (RolesEditorComponent) component;
try {
// Copy the values from Form to Component
myForm.doValidate();
// save the file contents
myComp.performSave(request);
// Get the latest values
fk = do_Refresh_Clicked();
} catch (ApplicationExceptions e) {
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, e);
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
if (fk == null)
fk = myComp.getRolesEditorFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.FormKey in project jaffa-framework by jaffa-projects.
the class DefaultValueEditorAction method do_Save_Clicked.
/**
* Clicked event handler for the field Save.
* @return The FormKey.
*/
public FormKey do_Save_Clicked() {
FormKey fk = null;
DefaultValueEditorForm myForm = (DefaultValueEditorForm) form;
DefaultValueEditorComponent myComp = (DefaultValueEditorComponent) myForm.getComponent();
try {
if (invokeDoValidateForScreen(myComp.getCurrentScreenCounter())) {
myComp.saveDefaultValues();
}
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
fk = myComp.determineFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.FormKey in project jaffa-framework by jaffa-projects.
the class DefaultValueEditorAction method do_Refresh_Clicked.
/**
* Clicked event handler for the field Refresh.
* @return The FormKey.
*/
public FormKey do_Refresh_Clicked() {
FormKey fk = null;
DefaultValueEditorForm myForm = (DefaultValueEditorForm) form;
DefaultValueEditorComponent myComp = (DefaultValueEditorComponent) myForm.getComponent();
myComp.setDefaultValues(null);
try {
myComp.obtainDefaultValues();
} catch (FrameworkException e) {
log.error(null, e);
myForm.raiseError(request, ActionMessages.GLOBAL_MESSAGE, "error.framework.general");
}
fk = myComp.determineFormKey();
return fk;
}
use of org.jaffa.presentation.portlet.FormKey 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