org.apache.myfaces.custom.subform
Class SubForm

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.apache.myfaces.custom.subform.SubForm
All Implemented Interfaces:
javax.faces.component.NamingContainer, javax.faces.component.StateHolder

public class SubForm
extends javax.faces.component.UIComponentBase
implements javax.faces.component.NamingContainer

A SubForm which will allow for partial validation and model update. 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.

Author:
Gerald Muellan, Martin Marinschek Date: 19.01.2006 Time: 13:58:18

Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
static java.lang.String DEFAULT_RENDERER_TYPE
           
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
SubForm()
           
 
Method Summary
 java.lang.String getFamily()
           
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 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, processDecodes, 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
 

Field Detail

COMPONENT_TYPE

public static final java.lang.String COMPONENT_TYPE
See Also:
Constant Field Values

DEFAULT_RENDERER_TYPE

public static final java.lang.String DEFAULT_RENDERER_TYPE
See Also:
Constant Field Values

COMPONENT_FAMILY

public static final java.lang.String COMPONENT_FAMILY
See Also:
Constant Field Values
Constructor Detail

SubForm

public SubForm()
Method Detail

getFamily

public java.lang.String getFamily()
Specified by:
getFamily in class javax.faces.component.UIComponent

isSubmitted

public boolean isSubmitted()

setSubmitted

public void setSubmitted(boolean submitted)

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 © 2011. All Rights Reserved.