public class Form extends UIForm
UIForm and provides a way to keep view parameters in the request URL after a
post-back.
The standard UIForm doesn't put the original view parameters in the action URL that's used for the post-back. Instead, it relies on those view
parameters to be stored in the state associated with the standard UIViewParameter. Via this state those parameters are invisibly re-applied
after every post-back.
The disadvantage of this invisible retention of view parameters is that the user doesn't see them anymore in the address bar of the browser that is used to interact with the faces application. Copy-pasting the URL from the address bar or refreshing the page by hitting enter inside the address bar will therefore not always yield the expected results.
To solve this, this component offers an attribute
You can use it the same way as includeViewParams that will optionally include all view parameters, in exactly the
same way that this can be done for <h:link> and <h:button>.
<h:form>, you only need to change h: to o:.
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_TYPE |
COMPONENT_FAMILYBEANINFO_KEY, bindings, COMPOSITE_COMPONENT_TYPE_KEY, COMPOSITE_FACET_NAME, CURRENT_COMPONENT, CURRENT_COMPOSITE_COMPONENT, FACETS_KEY, VIEW_LOCATION_KEYSEPARATOR_CHAR| Constructor and Description |
|---|
Form() |
| Modifier and Type | Method and Description |
|---|---|
void |
encodeBegin(FacesContext context) |
boolean |
isIncludeViewParams()
Return whether or not the view parameters should be encoded into the form's action URL.
|
void |
setIncludeViewParams(boolean includeViewParams)
Set whether or not the view parameters should be encoded into the form's action URL.
|
createUniqueId, getContainerClientId, getFamily, isPrependId, isSubmitted, processDecodes, processUpdates, processValidators, setPrependId, setSubmitted, visitTreeaddClientBehavior, addFacesListener, broadcast, clearInitialState, decode, encodeChildren, encodeEnd, findComponent, getAttributes, getChildCount, getChildren, getClientBehaviors, getClientId, getDefaultEventName, getEventNames, getFacesContext, getFacesListeners, getFacet, getFacetCount, getFacets, getFacetsAndChildren, getId, getParent, getRenderer, getRendererType, getRendersChildren, getValueBinding, invokeOnComponent, isRendered, isTransient, markInitialState, processRestoreState, processSaveState, queueEvent, removeFacesListener, restoreAttachedState, restoreState, saveAttachedState, saveState, setId, setParent, setRendered, setRendererType, setTransient, setValueBindingencodeAll, getClientId, getCompositeComponentParent, getCurrentComponent, getCurrentCompositeComponent, getListenersForEventClass, getNamingContainer, getResourceBundleMap, getStateHelper, getStateHelper, getValueExpression, initialStateMarked, isCompositeComponent, isInView, isVisitable, popComponentFromEL, processEvent, pushComponentToEL, setInView, setValueExpression, subscribeToEvent, unsubscribeFromEventpublic static final String COMPONENT_TYPE
public void encodeBegin(FacesContext context) throws IOException
encodeBegin in class UIComponentBaseIOExceptionpublic boolean isIncludeViewParams()
public void setIncludeViewParams(boolean includeViewParams)
includeViewParams - The state of the switch for encoding view parameters