Examples of createMethodExpression()


Examples of javax.el.ExpressionFactory.createMethodExpression()

            MethodExpression methodExpressionOneArg = attr.getMethodExpression(
                ctx, null, ActionSourceRule.ACTION_LISTENER_SIG);
           
            MethodExpression methodExpressionZeroArg =
                    expressionFactory.createMethodExpression(
                        ctx, methodExpressionOneArg.getExpressionString(),
                        Void.class, ActionSourceRule.ACTION_LISTENER_ZEROARG_SIG);           
           
            ((ActionSource2) instance)
                    .addActionListener(new MethodExpressionActionListener(
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

                }

                assert (null != expectedReturnType);
                assert (null != expectedParameters);

                MethodExpression me = f
                      .createMethodExpression(ctx.getELContext(),
                                              ve.getExpressionString(),
                                              expectedReturnType,
                                              expectedParameters);
                target.getAttributes().put(metadata.getName(),
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

              break;
            }
          }
          if (expressionString != null) {
            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
            MethodExpression action = new TagMethodExpression(value, expressionFactory.createMethodExpression(
                faceletContext, expressionString, String.class, ComponentUtils.ACTION_ARGS));
            ((ActionSource2) parent).setActionExpression(action);
          }
        } else if ("actionListener".equals(mode.getValue())) {
          String expressionString = value.getValue();
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

              break;
            }
          }
          if (expressionString != null) {
            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
            MethodExpression actionListener = new TagMethodExpression(value, expressionFactory.createMethodExpression(
                faceletContext, expressionString, null, ComponentUtils.ACTION_LISTENER_ARGS));
            ((ActionSource) parent).addActionListener(new MethodExpressionActionListener(actionListener));
          }
        } else if ("actionFromValue".equals(mode.getValue())) {
          if (!value.isLiteral()) {
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

    // in this case return nothing
    if (value.getValue().startsWith("${")) {
      ValueExpression expression = getExpression(faceletContext);
      if (expression != null) {
        ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
        return new TagMethodExpression(value, expressionFactory.createMethodExpression(faceletContext,
            expression.getExpressionString(), returnType, args));
      } else {
        return null;
      }
    } else {
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

        // Wrap custom expression factory
        ExpressionFactory wrappedExpressionFactory = getCurrentManager().wrapExpressionFactory(new DummyExpressionFactory());

        // Create method expression and invoke it with supplied EL context (porting package)
        MethodExpression methodExpression = wrappedExpressionFactory.createMethodExpression(null, "foo.test", String.class,
                null);
        Object methodElResult = methodExpression.invoke(getCurrentConfiguration().getEl().createELContext(getCurrentManager()),
                null);
        assertNotNull(methodElResult);
        assertTrue(methodElResult instanceof Integer);
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

                String expr = (sourceValue instanceof ValueExpression)
                                 ? ((ValueExpression) sourceValue).getExpressionString()
                                 : sourceValue.toString();
                ExpressionFactory f = ctx.getApplication().getExpressionFactory();
                MethodExpression me = f.createMethodExpression(ctx.getELContext(),
                                                               expr,
                                                               Object.class,
                                                               NO_ARGS);
                ((ActionSource2) target)
                      .setActionExpression(
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

                                 Object sourceValue,
                                 UIComponent target) {

                ValueExpression ve = (ValueExpression) sourceValue;
                ExpressionFactory f = ctx.getApplication().getExpressionFactory();
                MethodExpression me = f.createMethodExpression(ctx.getELContext(),
                                                               ve.getExpressionString(),
                                                               Void.TYPE,
                                                               ACTION_LISTENER_ARGS);
                MethodExpression noArg = f.createMethodExpression(ctx.getELContext(),
                                                                  ve.getExpressionString(),
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

                ExpressionFactory f = ctx.getApplication().getExpressionFactory();
                MethodExpression me = f.createMethodExpression(ctx.getELContext(),
                                                               ve.getExpressionString(),
                                                               Void.TYPE,
                                                               ACTION_LISTENER_ARGS);
                MethodExpression noArg = f.createMethodExpression(ctx.getELContext(),
                                                                  ve.getExpressionString(),
                                                                  Void.TYPE,
                                                                  NO_ARGS);

                ((ActionSource2) target).addActionListener(
View Full Code Here

Examples of javax.el.ExpressionFactory.createMethodExpression()

                                 Object sourceValue,
                                 UIComponent target) {

                ValueExpression ve = (ValueExpression) sourceValue;
                ExpressionFactory f = ctx.getApplication().getExpressionFactory();
                MethodExpression me = f.createMethodExpression(ctx.getELContext(),
                                                               ve.getExpressionString(),
                                                               Void.TYPE,
                                                               VALIDATOR_ARGS);

                ((EditableValueHolder) target).addValidator(
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.