public class HtmlResponseStateManager extends MyfacesResponseStateManager
Modifier and Type | Field and Description |
---|---|
static String |
INIT_PARAM_AUTOCOMPLETE_OFF_VIEW_STATE
Add autocomplete="off" to the view state hidden field.
|
static String |
INIT_PARAM_HANDLE_STATE_CACHING_MECHANICS
Define if the state caching code should be handled by the ResponseStateManager or by the StateManager used.
|
static String |
STANDARD_STATE_SAVING_PARAM |
RENDER_KIT_ID_PARAM, VIEW_STATE_PARAM
Constructor and Description |
---|
HtmlResponseStateManager() |
Modifier and Type | Method and Description |
---|---|
Object |
getState(FacesContext facesContext,
String viewId) |
protected StateCache |
getStateCache(FacesContext facesContext) |
String |
getViewState(FacesContext facesContext,
Object baseState) |
protected boolean |
isHandlingStateCachingMechanics(FacesContext facesContext) |
boolean |
isPostback(FacesContext context)
Checks if the current request is a postback
|
boolean |
isWriteStateAfterRenderViewRequired(FacesContext facesContext)
Indicates if the call to ResponseStateManager.writeState should be done after the view is fully rendered.
|
void |
saveState(FacesContext facesContext,
Object state)
Execute additional operations like save the state on a cache when server
side state saving is used.
|
void |
writeState(FacesContext facesContext,
Object state) |
writeStateAsUrlParams
getComponentStateToRestore, getTreeStructureToRestore, writeState
public static final String STANDARD_STATE_SAVING_PARAM
@JSFWebConfigParam(since="2.0.6", expectedValues="true, false", defaultValue="true", group="state") public static final String INIT_PARAM_HANDLE_STATE_CACHING_MECHANICS
This param is used to keep compatibility with previous state managers implementations depending from old myfaces way to deal with this. For example, JspStateManagerImpl requires this param set to false, but by default it is set to true, to keep aligned with the Reference Implementation (RI). Note also the default StateManagerImpl requires this property set to true in order to work correctly, so if you set this param to false, please remember to add an entry into your faces-config.xml setting up JspStateManagerImpl as the state manager to use.
@JSFWebConfigParam(since="2.2.8, 2.1.18, 2.0.24", expectedValues="true, false", defaultValue="true", group="state") public static final String INIT_PARAM_AUTOCOMPLETE_OFF_VIEW_STATE
protected boolean isHandlingStateCachingMechanics(FacesContext facesContext)
public void writeState(FacesContext facesContext, Object state) throws IOException
writeState
in class ResponseStateManager
IOException
public void saveState(FacesContext facesContext, Object state)
MyfacesResponseStateManager
saveState
in class MyfacesResponseStateManager
public Object getState(FacesContext facesContext, String viewId)
getState
in class ResponseStateManager
public boolean isPostback(FacesContext context)
isPostback
in class ResponseStateManager
public String getViewState(FacesContext facesContext, Object baseState)
getViewState
in class ResponseStateManager
public boolean isWriteStateAfterRenderViewRequired(FacesContext facesContext)
MyfacesResponseStateManager
isWriteStateAfterRenderViewRequired
in class MyfacesResponseStateManager
protected StateCache getStateCache(FacesContext facesContext)
Copyright © 2016 The Apache Software Foundation. All Rights Reserved.