Package javax.faces.application

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


                        {
                            if (url_marker == -1 || (form_marker != -1 && form_marker < url_marker))
                            {
                                //replace form_marker
                                realWriter.write(bodyStr, lastMarkerEnd, form_marker - lastMarkerEnd);
                                stateManager.writeState(facesContext, serializedView);
                                lastMarkerEnd = form_marker + JspViewHandlerImpl.FORM_STATE_MARKER_LEN;
                                form_marker = bodyStr.indexOf(JspViewHandlerImpl.FORM_STATE_MARKER, lastMarkerEnd);
                            }
                            else
                            {
View Full Code Here


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

                            int start = 0;
View Full Code Here

            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

            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

                    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

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

                    int start = 0;
View Full Code Here

                    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

   
            UIOutput output = new UIOutput();
            output.setValue("foo");
            output.setId("foo");
   
            stateManager.writeState(facesContext, stateManager.saveView(facesContext));
           
            viewStateParam = stateManager.getViewState(facesContext);
        }
        finally
        {
View Full Code Here

   
            UIOutput output = new UIOutput();
            output.setValue("foo");
            output.setId("foo");
   
            stateManager.writeState(facesContext, stateManager.saveView(facesContext));
           
            viewStateParam = stateManager.getViewState(facesContext);
        }
        finally
        {
View Full Code Here

                {
                    if (url_marker == -1 || (form_marker != -1 && form_marker < url_marker))
                    {
                        //replace form_marker
                        realWriter.write(bodyStr, lastMarkerEnd, form_marker - lastMarkerEnd);
                        stateManager.writeState(facesContext, serializedView);
                        lastMarkerEnd = form_marker + JspViewHandlerImpl.FORM_STATE_MARKER_LEN;
                        form_marker = bodyStr.indexOf(JspViewHandlerImpl.FORM_STATE_MARKER, lastMarkerEnd);
                    }
                    else
                    {
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.