Package javax.faces.context

Examples of javax.faces.context.PartialResponseWriter.startUpdate()


                    if (rvc.isRenderTarget("body") || rvc.isRenderTarget("form"))
                    {
                        UIComponent body = findBodyComponent(viewRoot);
                        if (body != null)
                        {
                            writer.startUpdate("javax.faces.ViewBody");
                            body.encodeAll(_facesContext);
                            writer.endUpdate();
                        }
                    }
                }
View Full Code Here


            //Retrieve the state and apply it if it is not null.
            String viewState = _facesContext.getApplication().getStateManager().getViewState(_facesContext);
            if (viewState != null)
            {
                writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
                writer.write(viewState);
                writer.endUpdate();
            }
        }
        catch (IOException ex)
View Full Code Here

                    parent = parent.getParent();
                }
            }
            try
            {
                writer.startUpdate(target.getClientId(_facesContext));
                inUpdate = true;
                target.encodeAll(_facesContext);
            }
            catch (IOException ex)
            {
View Full Code Here

        if (!context.getViewRoot().isTransient()) {
            // Get the view state and write it to the response..
            PartialViewContext pvc = context.getPartialViewContext();
            PartialResponseWriter writer = pvc.getPartialResponseWriter();
            writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
            String state = context.getApplication().getStateManager().getViewState(context);
            writer.write(state);
            writer.endUpdate();
        }
View Full Code Here

                    comp.processUpdates(ctx);
                } else if (curPhase == PhaseId.RENDER_RESPONSE) {

                    PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();

                    writer.startUpdate(comp.getClientId(ctx));
                    try {
                        // do the default behavior...
                        comp.encodeAll(ctx);
                    }
                    catch (Exception ce) {
View Full Code Here

        // with the special id of VIEW_ROOT_ID.  This is how the client
        // JavaScript knows how to replace the entire document with
        // this response.
        PartialViewContext pvc = context.getPartialViewContext();
        PartialResponseWriter writer = pvc.getPartialResponseWriter();
        writer.startUpdate(PartialResponseWriter.RENDER_ALL_MARKER);

        if (viewRoot.getChildCount() > 0) {
            for (UIComponent uiComponent : viewRoot.getChildren()) {
                uiComponent.encodeAll(context);
            }
View Full Code Here

    private void renderState(FacesContext context) throws IOException {

        // Get the view state and write it to the response..
        PartialViewContext pvc = context.getPartialViewContext();
        PartialResponseWriter writer = pvc.getPartialResponseWriter();
        writer.startUpdate(PartialResponseWriter.VIEW_STATE_MARKER);
        String state = context.getApplication().getStateManager().getViewState(context);
        writer.write(state);
        writer.endUpdate();

    }
View Full Code Here

                    comp.processUpdates(ctx);
                } else if (curPhase == PhaseId.RENDER_RESPONSE) {

                    PartialResponseWriter writer = ctx.getPartialViewContext().getPartialResponseWriter();

                    writer.startUpdate(comp.getClientId(ctx));
                    try {
                        // do the default behavior...
                        comp.encodeAll(ctx);
                    }
                    catch (Exception ce) {
View Full Code Here

        // with the special id of VIEW_ROOT_ID.  This is how the client
        // JavaScript knows how to replace the entire document with
        // this response.
        PartialViewContext pvc = context.getPartialViewContext();
        PartialResponseWriter writer = pvc.getPartialResponseWriter();
        writer.startUpdate(PartialResponseWriter.RENDER_ALL_MARKER);

        if (viewRoot.getChildCount() > 0) {
            for (UIComponent uiComponent : viewRoot.getChildren()) {
                uiComponent.encodeAll(context);
            }
View Full Code Here

                    if (rvc.isRenderTarget("head"))
                    {
                        UIComponent head = findHeadComponent(viewRoot);
                        if (head != null)
                        {
                            writer.startUpdate("javax.faces.ViewHead");
                            head.encodeAll(_facesContext);
                            writer.endUpdate();
                        }
                    }
                    if (rvc.isRenderTarget("body") || rvc.isRenderTarget("form"))
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.