Class FormComponent
- All Implemented Interfaces:
NamingContainer
,PartialStateHolder
,StateHolder
,TransientStateHolder
,UniqueIdVendor
,ComponentSystemEventListener
,FacesListener
,SystemEventListenerHolder
,EventListener
jakarta.faces.component.UIForm
that supports automatic
creation of form beans in request or session scope.- Version:
- $Rev$ $Date$
-
Field Summary
Fields inherited from class jakarta.faces.component.UIForm
COMPONENT_FAMILY, COMPONENT_TYPE
Fields inherited from class jakarta.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 jakarta.faces.component.NamingContainer
SEPARATOR_CHAR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
createActionForm
(FacesContext context) Create an appropriate form bean in the appropriate scope, if one does not already exist.Return the Struts action path to which this form should be submitted.Return the encoding type for this form submit.Return the component family to which this component belongs.getFocus()
Return the focus element name.Return the focus element index.Return the JavaScript to execute on form reset.Return the JavaScript to execute on form submit.getStyle()
Return the CSS style(s) to be rendered for this component.Return the CSS style class(es) to be rendered for this component.Return the target frame for the response to this form submit.void
processDecodes
(FacesContext context) Create an instance of the form bean (if necessary) before delegating to the standard decoding process.void
restoreState
(FacesContext context, Object state) Restore our state from the specified object.saveState
(FacesContext context) Create and return an object representing our state to be saved.void
Set the Struts action to which this form should be submitted.void
setEnctype
(String enctype) Set the encoding type for this form submit.void
Set the focus element name.void
setFocusIndex
(String focusIndex) Set the focus element index.void
setOnreset
(String onreset) Set the JavaScript to execute on form reset.void
setOnsubmit
(String onsubmit) Set the JavaScript to execute on form submit.void
Set the CSS style(s) to be rendered for this component.void
setStyleClass
(String styleClass) Set the CSS style class(es) to be rendered for this component.void
Set the target frame for the response to this form submit.Methods inherited from class jakarta.faces.component.UIForm
createUniqueId, getContainerClientId, isPrependId, isSubmitted, processUpdates, processValidators, setPrependId, setSubmitted, visitTree
Methods inherited from class jakarta.faces.component.UIComponentBase
addClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeBegin, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getListenersForEventClass, getParent, getPassThroughAttributes, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, saveAttachedState, setId, setParent, setRendered, setRendererType, setTransient, setValueBinding, subscribeToEvent, unsubscribeFromEvent
Methods inherited from class jakarta.faces.component.UIComponent
encodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getNamingContainer, getPassThroughAttributes, getResourceBundleMap, getStateHelper, getStateHelper, getTransientStateHelper, getTransientStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, restoreTransientState, saveTransientState, setInView, setValueExpression
-
Constructor Details
-
FormComponent
public FormComponent()
-
-
Method Details
-
getAction
Return the Struts action path to which this form should be submitted.
-
setAction
Set the Struts action to which this form should be submitted.
- Parameters:
action
- The new action path
-
getEnctype
Return the encoding type for this form submit.
-
setEnctype
Set the encoding type for this form submit.
- Parameters:
enctype
- The new enctype path
-
getFamily
Return the component family to which this component belongs.
-
getFocus
Return the focus element name.
-
setFocus
Set the focus element name.
- Parameters:
focus
- The new focus path
-
getFocusIndex
Return the focus element index.
-
setFocusIndex
Set the focus element index.
- Parameters:
focusIndex
- The new focusIndex path
-
getOnreset
Return the JavaScript to execute on form reset.
-
setOnreset
Set the JavaScript to execute on form reset.
- Parameters:
onreset
- The new onreset path
-
getOnsubmit
Return the JavaScript to execute on form submit.
-
setOnsubmit
Set the JavaScript to execute on form submit.
- Parameters:
onsubmit
- The new onsubmit path
-
getStyle
Return the CSS style(s) to be rendered for this component.
-
setStyle
Set the CSS style(s) to be rendered for this component.
- Parameters:
style
- The new CSS style(s)
-
getStyleClass
Return the CSS style class(es) to be rendered for this component.
-
setStyleClass
Set the CSS style class(es) to be rendered for this component.
- Parameters:
styleClass
- The new CSS style class(es)
-
getTarget
Return the target frame for the response to this form submit.
-
setTarget
Set the target frame for the response to this form submit.
- Parameters:
target
- The new CSS target(s)
-
processDecodes
Create an instance of the form bean (if necessary) before delegating to the standard decoding process.
- Overrides:
processDecodes
in classUIForm
- Parameters:
context
- FacesContext for the request we are processing
-
restoreState
Restore our state from the specified object.
- Specified by:
restoreState
in interfaceStateHolder
- Overrides:
restoreState
in classUIComponentBase
- Parameters:
context
-FacesContext
for the current requeststate
- Object containing our saved state
-
saveState
Create and return an object representing our state to be saved.
- Specified by:
saveState
in interfaceStateHolder
- Overrides:
saveState
in classUIComponentBase
- Parameters:
context
-FacesContext
for the current request
-
createActionForm
Create an appropriate form bean in the appropriate scope, if one does not already exist.
- Parameters:
context
- FacesContext for the current request- Throws:
IllegalArgumentException
- if no ActionConfig for the specified action attribute can be locatedIllegalArgumentException
- if no FormBeanConfig for the specified form bean can be locatedIllegalArgumentException
- if no ModuleConfig can be located for this application module
-