Search in sources :

Example 1 with ApplicationStateInfo

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;
}
Also used : ApplicationAssociate(com.sun.faces.application.ApplicationAssociate) ApplicationStateInfo(com.sun.faces.application.ApplicationStateInfo)

Aggregations

ApplicationAssociate (com.sun.faces.application.ApplicationAssociate)1 ApplicationStateInfo (com.sun.faces.application.ApplicationStateInfo)1