Package javax.faces.event

Examples of javax.faces.event.MethodExpressionActionListener


        if (this.listenerMethod != null) {
            MethodExpression listenerMethodExpression = this.listenerMethod.getMethodExpression(ctx, Void.TYPE,
                new Class<?>[] { ActionEvent.class });

            as.addActionListener(new MethodExpressionActionListener(listenerMethodExpression));
        } else {
            ValueExpression b = null;
            if (this.binding != null) {
                b = this.binding.getValueExpression(ctx, ActionListener.class);
            }
View Full Code Here


                    };
                }
                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

                            if (methodExpression == null)
                            {
                                methodExpression = context.getApplication().getExpressionFactory().
                                        createMethodExpression(context.getELContext(),
                                                attributeExpressionString, Void.TYPE, new Class[]{ActionEvent.class});
                                actionListener = new MethodExpressionActionListener(methodExpression);
                            }
                            else
                            {
                                // FIXME this will maybe need changes, because the second methodExpression
                                // is supposed to have zero args, but the underlying MethodExpression
                                // won't fulfill this requirement. -=Jakob Korherr=-
                                actionListener = new MethodExpressionActionListener(methodExpression, methodExpression);
                            }
                           
                            ((ActionSource2)innerComponent).addActionListener(actionListener);
                        }
                        else if ("validator".equals(attributeName))
View Full Code Here

                        new PartialMethodExpressionActionListener(methodExpressionOneArg, methodExpressionZeroArg));
            }
            else
            {
                ((ActionSource2) instance).addActionListener(
                        new MethodExpressionActionListener(methodExpressionOneArg, methodExpressionZeroArg));
            }
        }
View Full Code Here

            if (!(component instanceof ActionSource2))
            {
                throw new IllegalArgumentException("Component " + component.getClientId(context) + " is no ActionSource");
            }

            ((ActionSource2)component).addActionListener(new MethodExpressionActionListener(actionListener));
        }
    }
View Full Code Here

        {
            comp.setValueExpression("ondblclick", _ondblclick);
        }
        if (_actionListener != null)
        {
            comp.addActionListener(new MethodExpressionActionListener(_actionListener));
        }
        if (_for != null)
        {
            comp.setValueExpression("for", _for);
        }
View Full Code Here

            MethodExpression methodExpression2 = reWrapMethodExpression(context.getApplication().getExpressionFactory().
                    createMethodExpression(elContext,
                            attributeExpressionString, Void.TYPE, EMPTY_CLASS_ARRAY), attributeNameValueExpression);

            actionListener = new MethodExpressionActionListener(methodExpression, methodExpression2);
        }
        ((ActionSource2) innerComponent).addActionListener(actionListener);
        mctx.addMethodExpressionTargeted(innerComponent, targetAttributeName, actionListener);
    }
View Full Code Here

                                                                  ve.getExpressionString(),
                                                                  Void.TYPE,
                                                                  NO_ARGS);

                ((ActionSource2) target).addActionListener(
                      new MethodExpressionActionListener(
                            new ContextualCompositeMethodExpression(ve,
                                                                    me),
                            new ContextualCompositeMethodExpression(ve,
                                                                    noArg)));
View Full Code Here

                                                                  ve.getExpressionString(),
                                                                  Void.TYPE,
                                                                  NO_ARGS);

                ((ActionSource2) target).addActionListener(
                      new MethodExpressionActionListener(
                            new ContextualCompositeMethodExpression(ve,
                                                                    me),
                            new ContextualCompositeMethodExpression(ve,
                                                                    noArg)));
View Full Code Here

                    expressionFactory.createMethodExpression(
                        ctx, methodExpressionOneArg.getExpressionString(),
                        Void.class, ActionSourceRule.ACTION_LISTENER_ZEROARG_SIG);           
           
            ((ActionSource2) instance)
                    .addActionListener(new MethodExpressionActionListener(
                            methodExpressionOneArg, methodExpressionZeroArg));

        }
View Full Code Here

TOP

Related Classes of javax.faces.event.MethodExpressionActionListener

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.