Package javax.faces.component

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


        setRendererType("testcomponent");

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

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

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

            root.getAttributes().put(AutoscrollBehaviorTagHandler.AUTOSCROLL_TAG_ON_PAGE, Boolean.TRUE);
        }
       
        String eventName = (_event == null) ? null : _event.getValue(ctx);
       
        root.subscribeToViewEvent(PostAddToViewEvent.class,
                new RegisterAutoscrollBehaviorOnCommandListener(eventName));
        root.subscribeToEvent(PostRestoreStateEvent.class, new RegisterAutoscrollListener(eventName));
    }
   
    private UIViewRoot getViewRoot(FaceletContext ctx, UIComponent parent)
View Full Code Here

        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

        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

    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

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.