org.apache.myfaces.custom.subform
Class AbstractSubForm
java.lang.Object
javax.faces.component.UIComponent
javax.faces.component.UIComponentBase
org.apache.myfaces.custom.subform.AbstractSubForm
- All Implemented Interfaces:
- javax.faces.component.NamingContainer, javax.faces.component.StateHolder
- Direct Known Subclasses:
- SubForm
public abstract class AbstractSubForm
- extends javax.faces.component.UIComponentBase
- implements javax.faces.component.NamingContainer
A SubForm which will allow for partial validation
and model update.
A subform to an existing form. Inputs in this form will only be
validated and updated, if a t:commandButton or t:commandLink
has been clicked with an actionFor attribute which references
the client-id of this subform. Optionally, the validation will
trigger if a commandButton or commandLink embedded in this
subform has been clicked, except if this command is a
t:commandButton or t:commandLink with an actionFor attribute
which doesn't reference the client-id of this subform.
Components will be validated and updated only if
either a child-component of this form caused
the submit of the form, or an extended commandLink
or commandButton with the actionFor attribute set
to the client-id of this component was used.
You can have several comma-separated entries in
the actionFor-attribute - with this it's possible to
validate and update more than one subForm at once.
- Since:
- 1.1.7
- Author:
- Gerald Muellan, Martin Marinschek
Date: 19.01.2006
Time: 13:58:18
Fields inherited from interface javax.faces.component.NamingContainer |
SEPARATOR_CHAR |
Method Summary |
String |
getFamily()
|
abstract Boolean |
getPreserveSubmittedValues()
true|false - set to false if you submit other subforms and would like to
have your subform reflecting any model update. |
protected boolean |
isEmptyList(javax.faces.context.FacesContext context)
|
protected boolean |
isPartialEnabled(javax.faces.context.FacesContext context,
javax.faces.event.PhaseId phaseId)
Sets up information if this component is included in
the group of components which are associated with the current action. |
boolean |
isSubmitted()
|
void |
processDecodes(javax.faces.context.FacesContext context)
|
void |
processUpdates(javax.faces.context.FacesContext context)
|
void |
processValidators(javax.faces.context.FacesContext context)
|
void |
queueEvent(javax.faces.event.FacesEvent event)
|
void |
setSubmitted(boolean submitted)
|
Methods inherited from class javax.faces.component.UIComponentBase |
addFacesListener, broadcast, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientId, getFacesContext, getFacesListeners, getFacet, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
COMPONENT_TYPE
public static final String COMPONENT_TYPE
- See Also:
- Constant Field Values
DEFAULT_RENDERER_TYPE
public static final String DEFAULT_RENDERER_TYPE
- See Also:
- Constant Field Values
COMPONENT_FAMILY
public static final String COMPONENT_FAMILY
- See Also:
- Constant Field Values
AbstractSubForm
public AbstractSubForm()
getFamily
public String getFamily()
- Specified by:
getFamily
in class javax.faces.component.UIComponent
isSubmitted
public boolean isSubmitted()
setSubmitted
public void setSubmitted(boolean submitted)
getPreserveSubmittedValues
public abstract Boolean getPreserveSubmittedValues()
- true|false - set to false if you submit other subforms and would like to
have your subform reflecting any model update. Default: true
- Returns:
processDecodes
public void processDecodes(javax.faces.context.FacesContext context)
- Overrides:
processDecodes
in class javax.faces.component.UIComponentBase
processValidators
public void processValidators(javax.faces.context.FacesContext context)
- Overrides:
processValidators
in class javax.faces.component.UIComponentBase
processUpdates
public void processUpdates(javax.faces.context.FacesContext context)
- Overrides:
processUpdates
in class javax.faces.component.UIComponentBase
queueEvent
public void queueEvent(javax.faces.event.FacesEvent event)
- Overrides:
queueEvent
in class javax.faces.component.UIComponentBase
isEmptyList
protected boolean isEmptyList(javax.faces.context.FacesContext context)
isPartialEnabled
protected boolean isPartialEnabled(javax.faces.context.FacesContext context,
javax.faces.event.PhaseId phaseId)
- Sets up information if this component is included in
the group of components which are associated with the current action.
- Parameters:
context
-
- Returns:
- true if there has been a change by this setup which has to be undone after the phase finishes.
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.