Examples of subscribeToViewEvent()


Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

    private void subscribeToPreRenderViewEventOncePerRequest(FacesContext facesContext, UIComponent component) {
        Map<Object, Object> contextMap = facesContext.getAttributes();
        if (contextMap.get(this.getClientId() + PRE_RENDER_VIEW_EVENT_REGISTERED) == null) {
            contextMap.put(this.getClientId() + PRE_RENDER_VIEW_EVENT_REGISTERED, Boolean.TRUE);
            UIViewRoot viewRoot = getUIViewRoot(component);
            viewRoot.subscribeToViewEvent(PreRenderViewEvent.class, this);
        }
    }

    private UIViewRoot getUIViewRoot(UIComponent component) {
        UIComponent resolved = component;
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        if (modListener == null) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            modListener = new AddRemoveListener(ctx);
            UIViewRoot root = ctx.getViewRoot();
            root.subscribeToViewEvent(PostAddToViewEvent.class, modListener);
            root.subscribeToViewEvent(PreRemoveFromViewEvent.class, modListener);
        }
        setTrackViewModifications(true);
       
    }
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        if (modListener == null) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            modListener = new AddRemoveListener(ctx);
            UIViewRoot root = ctx.getViewRoot();
            root.subscribeToViewEvent(PostAddToViewEvent.class, modListener);
            root.subscribeToViewEvent(PreRemoveFromViewEvent.class, modListener);
        }
        setTrackViewModifications(true);
       
    }
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        setRendererType("testcomponent");

        FacesContext context = FacesContext.getCurrentInstance();
        UIViewRoot root = context.getViewRoot();

        root.subscribeToViewEvent(PreRenderViewEvent.class, this);
    }

    //
    // Public methods
    //
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

    {
        UIViewRoot root = super.createView(context, viewId);
        // This listener just ensures that the locations for autoscroll component are
        // set before call markInitialState(). In this way, the state size is reduced when
        // partial state saving is used.
        root.subscribeToViewEvent(PostAddToViewEvent.class, new SystemEventListener() {

            public boolean isListenerForSource(Object o)
            {
                return o instanceof UIViewRoot;
            }
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        setRendererType(null);

        FacesContext context = FacesContext.getCurrentInstance();
        UIViewRoot root = context.getViewRoot();

        root.subscribeToViewEvent(PreRenderViewEvent.class, this);
    }

    //
    // Public methods
    //
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        FacesContext context = FacesContext.getCurrentInstance();
        UIViewRoot root = context.getViewRoot();
        if (root != null)
        {
            root.subscribeToViewEvent(PreRenderViewEvent.class, this);
        }
    }

    //
    // Public methods
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        setRendererType(null);

        FacesContext context = FacesContext.getCurrentInstance();
        UIViewRoot root = context.getViewRoot();

        root.subscribeToViewEvent(PreRenderViewEvent.class, this);
    }

    //
    // Public methods
    //
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        FacesContext context = FacesContext.getCurrentInstance();
        UIViewRoot root = context.getViewRoot();
        if (root != null)
        {
            root.subscribeToViewEvent(PreRenderViewEvent.class, this);
        }
    }

    //
    // Public methods
View Full Code Here

Examples of javax.faces.component.UIViewRoot.subscribeToViewEvent()

        FacesContext context = FacesContext.getCurrentInstance();
        UIViewRoot root = context.getViewRoot();
        if (root != null)
        {
            root.subscribeToViewEvent(PreRenderViewEvent.class, this);
        }
    }

    //
    // Public methods
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.