Package javax.faces.event

Examples of javax.faces.event.PostAddToViewEvent


     * (resp. {@link PreRemoveFromViewEvent})
     */
    @Override
    public void processEvent(SystemEvent event) throws AbortProcessingException {
        if (event instanceof PostAddToViewEvent) {
            PostAddToViewEvent addToViewEvent = (PostAddToViewEvent) event;
            componentAdded(addToViewEvent.getComponent());
        } else if (event instanceof PreRemoveFromViewEvent) {
            PreRemoveFromViewEvent removeFromViewEvent = (PreRemoveFromViewEvent) event;
            componentRemoved(removeFromViewEvent.getComponent());
        } else {
            throw new IllegalArgumentException(event.toString());
View Full Code Here


        a.setValue("testOutput1");
       
        viewRoot.getChildren().add(a);
       
        //Simulate event
        PostAddToViewEvent evt = new PostAddToViewEvent(a);
       
        DefaultFaceletsStateManagementStrategy.PostAddPreRemoveFromViewListener listener =
            new DefaultFaceletsStateManagementStrategy.PostAddPreRemoveFromViewListener();
       
        listener.processEvent(evt);
View Full Code Here

        fireAndAssert("11", new PostValidateEvent(component));
    }

    @Test
    public void testObservePostAddToView() {
        fireAndAssert("12", new PostAddToViewEvent(component));
    }
View Full Code Here

        fireAndAssert("12", new PostAddToViewEvent(component));
    }

    @Test
    public void testObservePostAddToViewComponent() {
        fireAndAssert("13", new PostAddToViewEvent(component));
    }
View Full Code Here

public class ComponentMetadataTransformerListener implements SystemEventListener {

    public void processEvent(SystemEvent event) throws AbortProcessingException {
        try {
            if (event instanceof PostAddToViewEvent) {
                PostAddToViewEvent postAddToViewEvent = (PostAddToViewEvent) event;

                FacesContext context = FacesContext.getCurrentInstance();
                RequestContext requestContext = RequestContext.getCurrentInstance();
                ConfigContainer config = requestContext.getApplicationContext().getConfig();

                if (config.isTransformMetadataEnabled() && config.isBeanValidationAvailable()) {
                    BeanValidationComponentMetadataTransformer.getInstance().transform(context, requestContext, postAddToViewEvent.getComponent());
                }
            }
        }
        catch (IOException e) {
            throw new FacesException(e);
View Full Code Here

TOP

Related Classes of javax.faces.event.PostAddToViewEvent

Copyright © 2018 www.massapicom. 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.