org.primefaces.extensions.component.dynaform
Class DynaForm

java.lang.Object
  extended by javax.faces.component.UIComponent
      extended by javax.faces.component.UIComponentBase
          extended by org.primefaces.extensions.component.base.AbstractDynamicData
              extended by org.primefaces.extensions.component.dynaform.DynaForm
All Implemented Interfaces:
java.util.EventListener, javax.faces.component.NamingContainer, javax.faces.component.PartialStateHolder, javax.faces.component.StateHolder, javax.faces.component.TransientStateHolder, javax.faces.component.UniqueIdVendor, javax.faces.event.ComponentSystemEventListener, javax.faces.event.FacesListener, javax.faces.event.SystemEventListenerHolder, org.primefaces.component.api.Widget

public class DynaForm
extends AbstractDynamicData
implements org.primefaces.component.api.Widget

DynaForm component.

Since:
0.5
Version:
$Revision$
Author:
Oleg Varaksin / last modified by $Author$

Nested Class Summary
protected static class DynaForm.PropertyKeys
          Properties that are tracked by state saving.
 
Field Summary
static java.lang.String COMPONENT_FAMILY
           
static java.lang.String COMPONENT_TYPE
           
 
Fields inherited from class org.primefaces.extensions.component.base.AbstractDynamicData
data, OPTIMIZED_PACKAGE
 
Fields inherited from class javax.faces.component.UIComponent
ATTRS_WITH_DECLARED_DEFAULT_VALUES, BEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, HONOR_CURRENT_COMPONENT_ATTRIBUTES_PARAM_NAME, VIEW_LOCATION_KEY
 
Fields inherited from interface javax.faces.component.NamingContainer
SEPARATOR_CHAR
 
Constructor Summary
DynaForm()
           
 
Method Summary
protected  KeyData findData(java.lang.String key)
          Finds instance of KeyData by corresponding key.
 java.lang.String getButtonBarPosition()
           
 UIDynaFormControl getControlCell(java.lang.String type)
           
protected  java.util.Map<java.lang.String,UIDynaFormControl> getControlCells()
           
 java.lang.String getFamily()
           
 java.lang.String getStyle()
           
 java.lang.String getStyleClass()
           
 java.lang.String getWidgetVar()
           
protected  boolean invokeOnChildren(javax.faces.context.FacesContext context, java.lang.String clientId, javax.faces.component.ContextCallback callback)
          Searches a child component with the given clientId during invokeOnComponent() and invokes the callback on it if found.
 boolean isAutoSubmit()
           
 boolean isOpenExtended()
           
protected  void processChildren(javax.faces.context.FacesContext context, javax.faces.event.PhaseId phaseId)
          Processes children components during processDecodes(), processValidators(), processUpdates().
 java.lang.String resolveWidgetVar()
           
 void setAttribute(DynaForm.PropertyKeys property, java.lang.Object value)
           
 void setAutoSubmit(boolean autoSubmit)
           
 void setButtonBarPosition(java.lang.String buttonBarPosition)
           
 void setOpenExtended(boolean openExtended)
           
 void setStyle(java.lang.String style)
           
 void setStyleClass(java.lang.String styleClass)
           
 void setWidgetVar(java.lang.String widgetVar)
           
protected  boolean visitChildren(javax.faces.component.visit.VisitContext context, javax.faces.component.visit.VisitCallback callback)
          Visits children components during visitTree().
 
Methods inherited from class org.primefaces.extensions.component.base.AbstractDynamicData
broadcast, createUniqueId, exposeVar, getContainerClientId, getData, getValue, getVar, invokeOnComponent, processDecodes, processFacets, processUpdates, processValidators, queueEvent, resetData, restoreDescendantState, restoreDescendantState, saveDescendantState, saveDescendantState, setData, setData, setValue, setVar, visitTree
 
Methods inherited from class javax.faces.component.UIComponentBase
addClientBehavior, addFacesListener, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
 
Methods inherited from class javax.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression
 
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

COMPONENT_FAMILY

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

DynaForm

public DynaForm()
Method Detail

getFamily

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

getWidgetVar

public java.lang.String getWidgetVar()

setWidgetVar

public void setWidgetVar(java.lang.String widgetVar)

isAutoSubmit

public boolean isAutoSubmit()

setAutoSubmit

public void setAutoSubmit(boolean autoSubmit)

isOpenExtended

public boolean isOpenExtended()

setOpenExtended

public void setOpenExtended(boolean openExtended)

getButtonBarPosition

public java.lang.String getButtonBarPosition()

setButtonBarPosition

public void setButtonBarPosition(java.lang.String buttonBarPosition)

setStyle

public void setStyle(java.lang.String style)

getStyle

public java.lang.String getStyle()

setStyleClass

public void setStyleClass(java.lang.String styleClass)

getStyleClass

public java.lang.String getStyleClass()

resolveWidgetVar

public java.lang.String resolveWidgetVar()
Specified by:
resolveWidgetVar in interface org.primefaces.component.api.Widget

setAttribute

public void setAttribute(DynaForm.PropertyKeys property,
                         java.lang.Object value)

getControlCell

public UIDynaFormControl getControlCell(java.lang.String type)

getControlCells

protected java.util.Map<java.lang.String,UIDynaFormControl> getControlCells()

findData

protected KeyData findData(java.lang.String key)
Description copied from class: AbstractDynamicData
Finds instance of KeyData by corresponding key.

Specified by:
findData in class AbstractDynamicData
Parameters:
key - unique key
Returns:
KeyData found data

processChildren

protected void processChildren(javax.faces.context.FacesContext context,
                               javax.faces.event.PhaseId phaseId)
Description copied from class: AbstractDynamicData
Processes children components during processDecodes(), processValidators(), processUpdates().

Specified by:
processChildren in class AbstractDynamicData
Parameters:
context - faces context FacesContext
phaseId - current JSF phase id

visitChildren

protected boolean visitChildren(javax.faces.component.visit.VisitContext context,
                                javax.faces.component.visit.VisitCallback callback)
Description copied from class: AbstractDynamicData
Visits children components during visitTree().

Specified by:
visitChildren in class AbstractDynamicData
Parameters:
context - visit context VisitContext
callback - visit callback VisitCallback
Returns:
boolean true - indicates that the children's visit is complete (e.g. all components that need to be visited have been visited), false - otherwise.

invokeOnChildren

protected boolean invokeOnChildren(javax.faces.context.FacesContext context,
                                   java.lang.String clientId,
                                   javax.faces.component.ContextCallback callback)
Description copied from class: AbstractDynamicData
Searches a child component with the given clientId during invokeOnComponent() and invokes the callback on it if found.

Specified by:
invokeOnChildren in class AbstractDynamicData
Parameters:
context - faces context FacesContext
clientId - client Id
callback - ContextCallback
Returns:
boolean true - child component was found, else - otherwise


Copyright © 2011-2013. All Rights Reserved.