use of com.sun.faces.application.ApplicationStateInfo in project mojarra by eclipse-ee4j.
the class StateContext method getStateContext.
/**
* @param ctx the <code>FacesContext</code> for the current request
* @return <code>StateContext</code> for this request
*/
public static StateContext getStateContext(FacesContext ctx) {
StateContext stateCtx = (StateContext) ctx.getAttributes().get(KEY);
if (stateCtx == null) {
ApplicationAssociate associate = ApplicationAssociate.getCurrentInstance();
ApplicationStateInfo info = associate.getApplicationStateInfo();
stateCtx = new StateContext(info);
ctx.getAttributes().put(KEY, stateCtx);
}
return stateCtx;
}
Aggregations