this interface must be implemented by an action form, which handles CRUD events.
Field Summary | |
static java.lang.String |
CRUD_UI_MODE_EDIT
Editing UI mode: business data must have been already created or loaded. |
static java.lang.String |
CRUD_UI_MODE_INACTIVE
Default UI mode: no business data loaded. |
static java.lang.String |
CRUD_UI_MODE_NEW
Creating and editing of a new item. |
static java.lang.String |
CRUD_UI_MODE_READONLY
View-only UI mode: business data must have been already created or loaded. |
static java.lang.String |
CRUD_UI_MODE_UPDATE
Editing an existing item. |
Method Summary | |
void |
changeCrudUIMode(java.lang.String mode)
Sets UI mode. |
org.apache.struts.action.ActionMessages |
crudCancel()
Cancels process of updating existing or new item. |
org.apache.struts.action.ActionMessages |
crudClose()
Closes preview from of existing item. |
org.apache.struts.action.ActionMessages |
crudCreate()
Creates new business data |
org.apache.struts.action.ActionMessages |
crudDelete()
Deletes business data from underlying persistent layer |
org.apache.struts.action.ActionMessages |
crudDuplicate()
Duplicates new business data from existing object |
org.apache.struts.action.ActionMessages |
crudLoadForPreview()
Load business data from persistence layer into the action form or into nested property of action form, and switches to view mode. |
org.apache.struts.action.ActionMessages |
crudLoadForUpdate()
Load business data from persistence layer into the action form or into nested property of action form, and switches to edit mode. |
org.apache.struts.action.ActionMessages |
crudReset()
Resets content of existing form. |
org.apache.struts.action.ActionMessages |
crudStore()
Stores business data in the persistence layer. |
java.lang.String |
getCrudUIMode()
Returns current UI mode for this action form. |
Field Detail |
public static final java.lang.String CRUD_UI_MODE_INACTIVE
public static final java.lang.String CRUD_UI_MODE_EDIT
CRUD_UI_MODE_UPDATE
and CRUD_UI_MODE_NEW
. Whenever one of these two states
is set, this state must be true as well.
CRUD_UI_MODE_UPDATE
,
CRUD_UI_MODE_NEW
,
Constant Field Valuespublic static final java.lang.String CRUD_UI_MODE_NEW
CRUD_UI_MODE_UPDATE
,
CRUD_UI_MODE_EDIT
,
Constant Field Valuespublic static final java.lang.String CRUD_UI_MODE_UPDATE
CRUD_UI_MODE_EDIT
,
CRUD_UI_MODE_NEW
,
Constant Field Valuespublic static final java.lang.String CRUD_UI_MODE_READONLY
Method Detail |
public void changeCrudUIMode(java.lang.String mode)
Once new data is loaded from persistent storage, or created, mode should be changed to either CRUD_VIEW_MODE_EDIT or CRUD_VIEW_MODE_NOEDIT which allow to view/edit/delete/save the data.
After data is saved or edit mode is canceled, view mode should be chaged back to CRUD_VIEW_MODE_INACTIVE to prevent responding to a browser with a stale page, or accepting data from a stale page.
mode
- UI mode for this action formCRUD_UI_MODE_INACTIVE
,
CRUD_UI_MODE_EDIT
,
CRUD_UI_MODE_READONLY
public java.lang.String getCrudUIMode()
CRUD_UI_MODE_INACTIVE
,
CRUD_UI_MODE_EDIT
,
CRUD_UI_MODE_READONLY
public org.apache.struts.action.ActionMessages crudCreate()
public org.apache.struts.action.ActionMessages crudDuplicate()
public org.apache.struts.action.ActionMessages crudLoadForUpdate()
public org.apache.struts.action.ActionMessages crudLoadForPreview()
public org.apache.struts.action.ActionMessages crudDelete()
public org.apache.struts.action.ActionMessages crudCancel()
public org.apache.struts.action.ActionMessages crudReset()
public org.apache.struts.action.ActionMessages crudClose()
public org.apache.struts.action.ActionMessages crudStore()