|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.faces.model.DataModel
org.apache.myfaces.trinidad.model.CollectionModel
org.apache.myfaces.trinidad.model.TreeModel
org.apache.myfaces.trinidad.model.MenuModel
org.apache.myfaces.trinidad.model.BaseMenuModel
org.apache.myfaces.trinidad.model.ViewIdPropertyMenuModel
org.apache.myfaces.trinidad.model.ProcessMenuModel
public class ProcessMenuModel
There are two common scenarios for processes, "Plus One" and "Max Visited" which are explained below.
A node in a process should be readOnly
if that step of the process is not reachable from the current
step. The isReadOnly()
method can be used to
bind the node's readOnly attribute.
A node in a process should be immediate if the values
in the current step don't need to be validated.
The isImmediate()
method can be used to
bind the node's immediate attribute.
ProcessUtils
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.myfaces.trinidad.model.LocalRowKeyIndex |
---|
LocalRowKeyIndex.Confidence, LocalRowKeyIndex.LocalCachingStrategy |
Constructor Summary | |
---|---|
ProcessMenuModel()
No-arg constructor for use with managed-beans. |
|
ProcessMenuModel(Object instance,
String viewIdProperty)
The "Plus One" behavior will be used with this constructor. |
|
ProcessMenuModel(Object instance,
String viewIdProperty,
String maxPathKey)
|
Method Summary | |
---|---|
void |
clearMaxPath()
to clear the max visited path out of the session |
String |
getMaxPathKey()
|
boolean |
isImmediate()
A node in a process should be immediate if the values in the current step don't need to be validated. |
boolean |
isReadOnly()
A node in a process should be readOnly if that step of the process is not reachable from the current step. |
boolean |
isVisited()
For the Max Visited case, a stop is considered visited if - a stop is before the max visited stop - or is the max visited stop For the Plus One case, a stop is considered visited if, - it's before the current or, - is the current stop itself |
void |
setMaxPathKey(String maxPathKey)
|
Methods inherited from class org.apache.myfaces.trinidad.model.ViewIdPropertyMenuModel |
---|
addViewId, getCurrentViewId, getFocusRowKey, getViewIdProperty, setViewIdProperty, setWrappedData |
Methods inherited from class org.apache.myfaces.trinidad.model.BaseMenuModel |
---|
enterContainer, exitContainer, getContainerRowKey, getRowCount, getRowData, getRowIndex, getRowKey, getWrappedData, isContainer, isRowAvailable, setRowIndex, setRowKey |
Methods inherited from class org.apache.myfaces.trinidad.model.TreeModel |
---|
areRowsLocallyAvailable, areRowsLocallyAvailable, areRowsLocallyAvailable, getAllAncestorContainerRowKeys, getContainerRowKey, getDepth, getDepth, isChildCollectionLocallyAvailable, isChildCollectionLocallyAvailable, isChildCollectionLocallyAvailable, isContainerEmpty |
Methods inherited from class javax.faces.model.DataModel |
---|
addDataModelListener, getDataModelListeners, iterator, removeDataModelListener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProcessMenuModel()
ViewIdPropertyMenuModel.setViewIdProperty(java.lang.String)
and
ViewIdPropertyMenuModel.setWrappedData(java.lang.Object)
methods after constructing this instance.
public ProcessMenuModel(Object instance, String viewIdProperty) throws IntrospectionException
instance
- a treeModel. This object will be passed to
ModelUtils.toTreeModel(java.lang.Object)
viewIdProperty
- the property to use to retrieve a viewId
from a node in the tree
IntrospectionException
public ProcessMenuModel(Object instance, String viewIdProperty, String maxPathKey) throws IntrospectionException
instance
- a treeModel. This object will be passed to
ModelUtils.toTreeModel(java.lang.Object)
viewIdProperty
- the property to use to retrieve a viewId
from a node in the treemaxPathKey
- if the "Max Visited" behavior is desired, this
is the key that will be used to get and set the maxPath value
on the session and request. For the "Plus One" behavior pass in null.
IntrospectionException
Method Detail |
---|
public boolean isImmediate()
A node in a process should be immediate if the values in the current step don't need to be validated. This method can be used to bind the node's immediate attribute. If a user will have to return to the current page then immediate can be set to true. For example in a "Plus One" process, if the user is on step 5 and goes back to step 2, the user will have to come back to step 5 again, so the fields on page 5 don't need to be validated when going back to steps 1,2,3,4, but should be validated when going to step 6.
public boolean isReadOnly()
A node in a process should be readOnly if that step of the process is not reachable from the current step. This method can be used to bind the node's readOnly attribute.
public boolean isVisited()
public void clearMaxPath()
public void setMaxPathKey(String maxPathKey)
public String getMaxPathKey()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |