Package javax.faces.application.StateManager

Examples of javax.faces.application.StateManager.SerializedView


        Object treeStruct = null;
        Object compStates = null;
       
        if (state instanceof SerializedView)
        {
            SerializedView view = (SerializedView)state;
            treeStruct = view.getStructure();
            compStates = view.getState();
        }
        else if (state instanceof Object[])
        {
            Object[] structureAndState = (Object[])state;
View Full Code Here


        Object treeStruct = null;
        Object compStates = null;

        if (state instanceof SerializedView)
        {
            SerializedView view = (SerializedView) state;
            treeStruct = view.getStructure();
            compStates = view.getState();
        }
        else if (state instanceof Object[])
        {
            Object[] structureAndState = (Object[]) state;
View Full Code Here

     *
     */
    public void writeState(FacesContext context,
        Object state) throws IOException {
       
  SerializedView view;
  if (state instanceof SerializedView) {
      view = (SerializedView) state;
  }
  else {
            if (state instanceof Object[]) {
                Object[] stateArray = (Object[])state;
                if (2 == stateArray.length) {
              StateManager stateManager =
            context.getApplication().getStateManager();
              view = stateManager.new SerializedView(stateArray[0],
                        stateArray[1]);
                } else {
                    //PENDING - I18N
                    if (log.isLoggable(Level.SEVERE)) {
                        log.log(Level.SEVERE, "State is not an expected array of length 2.");
View Full Code Here

    } catch (NoSuchMethodException e) {
      // JSF 1.1 !
    }
    ResponseWriter writer = context.getResponseWriter();
    StateManager stateManager = context.getApplication().getStateManager();
    SerializedView serializedView = stateManager
        .saveSerializedView(context);
    if (null != writer && null != serializedView) {
      StringWriter bufWriter = new StringWriter();
      ResponseWriter cloneWithWriter = writer.cloneWithWriter(bufWriter);
      context.setResponseWriter(cloneWithWriter);
View Full Code Here

    public static final String RENDER_KIT_ID_PARAM = "javax.faces.RenderKitId";
    public static final String VIEW_STATE_PARAM = "javax.faces.ViewState";

    public void writeState(FacesContext context, Object state) throws IOException
    {
        SerializedView view;
        if (state instanceof SerializedView)
        {
            view = (SerializedView)state;
        }
        else if (state instanceof Object[])
        {
            Object[] structureAndState = (Object[])state;

            if (structureAndState.length == 2)
            {
                Object structureObj = structureAndState[0];
                Object stateObj = structureAndState[1];

                StateManager stateManager = context.getApplication().getStateManager();
                view = stateManager.new SerializedView(structureObj, stateObj);
            }
            else
            {
                throw new IOException("The state should be an array of Object[] of lenght 2");
            }
View Full Code Here

{
    public static final String RENDER_KIT_ID_PARAM = "javax.faces.RenderKitId";
    public static final String VIEW_STATE_PARAM = "javax.faces.ViewState";
   
    public void writeState(FacesContext context, Object state) throws IOException{
        SerializedView view;
        if (state instanceof SerializedView)
        {
            view = (SerializedView) state;
        }
        else
            if (state instanceof Object[])
            {
                Object[] structureAndState = (Object[]) state;

                if (structureAndState.length == 2)
                {
                    Object structureObj = structureAndState[0];
                    Object stateObj = structureAndState[1];

                    StateManager stateManager = context.getApplication().getStateManager();
                    view = stateManager.new SerializedView(structureObj, stateObj);
                }
                else
                {
                    throw new IOException("The state should be an array of Object[] of lenght 2");
                }
View Full Code Here

    public static final String RENDER_KIT_ID_PARAM = "javax.faces.RenderKitId";
    public static final String VIEW_STATE_PARAM = "javax.faces.ViewState";

    public void writeState(FacesContext context, Object state) throws IOException
    {
        SerializedView view;
        if (state instanceof SerializedView)
        {
            view = (SerializedView)state;
        }
        else if (state instanceof Object[])
        {
            Object[] structureAndState = (Object[])state;

            if (structureAndState.length == 2)
            {
                Object structureObj = structureAndState[0];
                Object stateObj = structureAndState[1];

                StateManager stateManager = context.getApplication().getStateManager();
                view = stateManager.new SerializedView(structureObj, stateObj);
            }
            else
            {
                throw new IOException("The state should be an array of Object[] of lenght 2");
            }
View Full Code Here

   
    public static final String NON_POSTBACK_VIEW_TOKEN_PARAM = "javax.faces.Token";

    public void writeState(FacesContext context, Object state) throws IOException
    {
        SerializedView view;
        if (state instanceof SerializedView)
        {
            view = (SerializedView)state;
        }
        else if (state instanceof Object[])
        {
            Object[] structureAndState = (Object[])state;

            if (structureAndState.length == 2)
            {
                Object structureObj = structureAndState[0];
                Object stateObj = structureAndState[1];

                StateManager stateManager = context.getApplication().getStateManager();
                view = stateManager.new SerializedView(structureObj, stateObj);
            }
            else
            {
                throw new IOException("The state should be an array of Object[] of lenght 2");
            }
View Full Code Here

     *
     */
    public void writeState(FacesContext context,
        Object state) throws IOException {
       
  SerializedView view;
  if (state instanceof SerializedView) {
      view = (SerializedView) state;
  }
  else {
            if (state instanceof Object[]) {
                Object[] stateArray = (Object[])state;
                if (2 == stateArray.length) {
              StateManager stateManager =
            context.getApplication().getStateManager();
              view = stateManager.new SerializedView(stateArray[0],
                        stateArray[1]);
                } else {
                    //PENDING - I18N
                    if (log.isLoggable(Level.SEVERE)) {
                        log.log(Level.SEVERE, "State is not an expected array of length 2.");
View Full Code Here

   
    public static final String NON_POSTBACK_VIEW_TOKEN_PARAM = "javax.faces.Token";

    public void writeState(FacesContext context, Object state) throws IOException
    {
        SerializedView view;
        if (state instanceof SerializedView)
        {
            view = (SerializedView)state;
        }
        else if (state instanceof Object[])
        {
            Object[] structureAndState = (Object[])state;

            if (structureAndState.length == 2)
            {
                Object structureObj = structureAndState[0];
                Object stateObj = structureAndState[1];

                StateManager stateManager = context.getApplication().getStateManager();
                view = stateManager.new SerializedView(structureObj, stateObj);
            }
            else
            {
                throw new IOException("The state should be an array of Object[] of lenght 2");
            }
View Full Code Here

TOP

Related Classes of javax.faces.application.StateManager.SerializedView

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.