com.ibm.xsp.actions
Class ChangeDocumentModeAction
java.lang.Object
javax.faces.el.MethodBinding
com.ibm.xsp.binding.MethodBindingEx
com.ibm.xsp.actions.AbstractDocumentAction
com.ibm.xsp.actions.ChangeDocumentModeAction
- All Implemented Interfaces:
- ComponentBindingObject, ValueBindingObject, javax.faces.component.StateHolder
public class ChangeDocumentModeAction
- extends AbstractDocumentAction
Not intended to be subclassed
Fields inherited from class com.ibm.xsp.actions.AbstractDocumentAction |
ACTION, ACTION_EDIT, ACTION_NEW, ACTION_OPEN, CURRENT_DOCUMENT, DOCUMENT, DOCUMENT_ID, MODE_AUTOEDIT, MODE_EDIT, MODE_READONLY, MODE_TOGGLE, PARENT_ID, VIEW_ENTRY |
Method Summary |
static void |
checkMode(java.lang.String mode)
|
java.lang.String |
getMode()
|
java.lang.Class |
getType(javax.faces.context.FacesContext context)
|
java.lang.Object |
invoke(javax.faces.context.FacesContext context,
java.lang.Object[] params)
|
static boolean |
isReadOnly(javax.faces.context.FacesContext context,
DocumentAdapter documentAdapter,
java.lang.Object document,
java.lang.String mode)
|
void |
restoreState(javax.faces.context.FacesContext context,
java.lang.Object value)
|
java.lang.Object |
saveState(javax.faces.context.FacesContext context)
|
void |
setMode(java.lang.String mode)
|
Methods inherited from class com.ibm.xsp.binding.MethodBindingEx |
getComponent, getFacesContext, getParamNames, getParent, getSourceReferenceId, getValueBinding, isTransient, normalizePageName, setComponent, setParamNames, setParent, setSourceReferenceId, setTransient, setValueBinding |
Methods inherited from class javax.faces.el.MethodBinding |
getExpressionString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ChangeDocumentModeAction
public ChangeDocumentModeAction()
getMode
public java.lang.String getMode()
- Returns:
- Returns the value of the
mode
property.
setMode
public void setMode(java.lang.String mode)
- Parameters:
mode
- Set the value of the mode
property.
Sets the mode to which the document will change.
Corresponds to the Document Mode of the Change Document Mode Simple Action.
Valid values are
- toggle
- readOnly
- edit
- autoEdit
Toggle switches between Read and Edit.
AutoEdit changes to Edit automatically if the user has Edit access.
invoke
public java.lang.Object invoke(javax.faces.context.FacesContext context,
java.lang.Object[] params)
throws javax.faces.el.EvaluationException,
javax.faces.el.MethodNotFoundException
- Specified by:
invoke
in class javax.faces.el.MethodBinding
- Throws:
javax.faces.el.EvaluationException
javax.faces.el.MethodNotFoundException
getType
public java.lang.Class getType(javax.faces.context.FacesContext context)
throws javax.faces.el.MethodNotFoundException
- Specified by:
getType
in class javax.faces.el.MethodBinding
- Throws:
javax.faces.el.MethodNotFoundException
saveState
public java.lang.Object saveState(javax.faces.context.FacesContext context)
- Specified by:
saveState
in interface javax.faces.component.StateHolder
- Overrides:
saveState
in class AbstractDocumentAction
restoreState
public void restoreState(javax.faces.context.FacesContext context,
java.lang.Object value)
- Specified by:
restoreState
in interface javax.faces.component.StateHolder
- Overrides:
restoreState
in class AbstractDocumentAction
isReadOnly
public static boolean isReadOnly(javax.faces.context.FacesContext context,
DocumentAdapter documentAdapter,
java.lang.Object document,
java.lang.String mode)
- Parameters:
context
- documentAdapter
- document
- mode
-
- Returns:
- true if the document is read only.
checkMode
public static void checkMode(java.lang.String mode)
- Parameters:
mode
- Helper method to check is the mode a valid value