Package org.richfaces.view.facelets

Examples of org.richfaces.view.facelets.MethodMetadata


    static class AjaxPollHandlerMetaRule extends MetaRule {
        public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
            if (meta.isTargetInstanceOf(AbstractPoll.class)) {
                if ("action".equals(name)) {
                    return new MethodMetadata(attribute) {
                        public void applyMetadata(FaceletContext ctx, Object instance) {
                            ((AbstractPoll) instance).setActionExpression(getMethodExpression(ctx));
                        }
                    };
                }
                if ("actionExpression".equals(name)) {
                    return new MethodMetadata(attribute) {
                        public void applyMetadata(FaceletContext ctx, Object instance) {
                            ((AbstractPoll) instance).setActionExpression(getMethodExpression(ctx));
                        }
                    };
                }
                if ("actionListener".equals(name)) {
                    return new MethodMetadata(attribute, ActionEvent.class) {
                        public void applyMetadata(FaceletContext ctx, Object instance) {
                            ActionListener actionListener = new MethodExpressionActionListener(getMethodExpression(ctx));
                            ((AbstractPoll) instance).addActionListener(actionListener);
                        }
                    };
View Full Code Here


    static class AjaxPollHandlerMetaRule extends MetaRule {
        public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
            if (meta.isTargetInstanceOf(AbstractPoll.class)) {
                if ("action".equals(name)) {
                    return new MethodMetadata(attribute) {
                        public void applyMetadata(FaceletContext ctx, Object instance) {
                            ((AbstractPoll) instance).setAction(getMethodBinding(ctx));
                        }
                    };
                }
                if ("actionExpression".equals(name)) {
                    return new MethodMetadata(attribute) {
                        public void applyMetadata(FaceletContext ctx, Object instance) {
                            ((AbstractPoll) instance).setActionExpression(getMethodExpression(ctx));
                        }
                    };
                }
                if ("actionListener".equals(name)) {
                    return new MethodMetadata(attribute, ActionEvent.class) {
                        public void applyMetadata(FaceletContext ctx, Object instance) {
                            ((AbstractPoll) instance).setActionListener(getMethodBinding(ctx));
                        }
                    };
                }
View Full Code Here

    static class MediaOutputHandlerMetaRule extends MetaRule {
        public Metadata applyRule(String name, TagAttribute attribute, MetadataTarget meta) {
            if (meta.isTargetInstanceOf(AbstractMediaOutput.class)) {
                if ("createContent".equals(name)) {
                    return new MethodMetadata(attribute, OutputStream.class, Object.class) {
                        public void applyMetadata(FaceletContext ctx, Object instance) {
                            ((AbstractMediaOutput) instance).setCreateContent(getMethodExpression(ctx));
                        }
                    };
                }
View Full Code Here

TOP

Related Classes of org.richfaces.view.facelets.MethodMetadata

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.