Examples of writeState()


Examples of javax.faces.application.StateManager.writeState()

                    {
                        stateStr = null;
                    }
                    else
                    {
                        stateMgr.writeState(context, (StateManager.SerializedView) stateObj);
                        stateStr = stateWriter.getAndResetBuffer();
                    }

                    int start = 0;
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

    ResponseWriter realWriter = facesContext.getResponseWriter();
    facesContext.setResponseWriter(realWriter.cloneWithWriter(stateWriter));

    Object serializedView = stateManager.saveView(facesContext);

    stateManager.writeState(facesContext, serializedView);
    facesContext.setResponseWriter(realWriter);

    String state = stateWriter.getBuffer().toString();

    ExternalContext extContext = facesContext.getExternalContext();
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

    facesContext.setResponseWriter(stateWriter);

    StateManager stateManager = facesContext.getApplication().getStateManager();
    StateManager.SerializedView serializedView
        = stateManager.saveSerializedView(facesContext);
    stateManager.writeState(facesContext, serializedView);
    return jsfState.toString();
  }

  private static void ensureContentTypeHeader(FacesContext facesContext, String charset, String contentType) {
    // TODO PortletRequest
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

    ResponseWriter realWriter = facesContext.getResponseWriter();
    facesContext.setResponseWriter(realWriter.cloneWithWriter(stateWriter));

    Object serializedView = stateManager.saveView(facesContext);

    stateManager.writeState(facesContext, serializedView);
    facesContext.setResponseWriter(realWriter);

    String state = stateWriter.getBuffer().toString();

    ExternalContext extContext = facesContext.getExternalContext();
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

                            {
                                stateStr = null;
                            }
                            else
                            {
                                stateMgr.writeState(context, stateObj);
                                stateStr = stateWriter.getAndResetBuffer();
                            }

                            int start = 0;
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

            facesContext.getResponseWriter().write(FORM_STATE_MARKER);
        }
        }
        else
        {
            stateManager.writeState(facesContext, new Object[2]);
        }
    }

    /**
     * Writes the response and replaces the state marker tags with the state information for the current context
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

            ResponseWriter realWriter = facesContext.getResponseWriter();
            facesContext.setResponseWriter(realWriter.cloneWithWriter(stateWriter));

            Object serializedView = stateManager.saveView(facesContext);

            stateManager.writeState(facesContext, serializedView);
            facesContext.setResponseWriter(realWriter);

            StringBuilder contentBuffer = getStringBuilder();
            String state = stateWriter.getBuffer().toString();
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

                    context.getResponseWriter().write(FORM_STATE_MARKER);
                }
            }
            else
            {
                stateManager.writeState(context, new Object[2]);
            }
        }
        else
        {
            // Only write state marker if javascript view state is disabled
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

    if (null != serializedView && null != writer) {
      StringWriter bufWriter = new StringWriter();
      ResponseWriter tempWriter;
      tempWriter = writer.cloneWithWriter(bufWriter);
      context.setResponseWriter(tempWriter);
      stateManager.writeState(context, serializedView);
      tempWriter.flush();
      if (bufWriter.getBuffer().length() > 0) {
        context.getExternalContext().getRequestMap().put(
            AjaxViewHandler.SERIALIZED_STATE_KEY,
            bufWriter.toString());
View Full Code Here

Examples of javax.faces.application.StateManager.writeState()

            ResponseWriter origWriter = context.getResponseWriter();
            FastStringWriter state =
                  new FastStringWriter((stateManager.isSavingStateInClient(
                        context)) ? bufSize : 128);
            context.setResponseWriter(origWriter.cloneWithWriter(state));
            stateManager.writeState(context, stateManager.saveView(context));
            context.setResponseWriter(origWriter);
            StringBuilder builder = fWriter.getBuffer();
            // begin writing...
            int totalLen = builder.length();
            StringBuilder stateBuilder = state.getBuffer();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.