Package javax.el

Examples of javax.el.ExpressionFactory.createMethodExpression()


    if (value.getValue().startsWith("${")) {
      String myValue = value.getValue().replaceAll("(\\$\\{)|(\\})", "");
      ValueExpression expression = faceletContext.getVariableMapper().resolveVariable(myValue);
      if (expression != null) {
        ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
        return new TagMethodExpression(value, expressionFactory.createMethodExpression(faceletContext,
            expression.getExpressionString(), returnType, args));
      }
    } else {
      return value.getMethodExpression(faceletContext, returnType, args);
    }
View Full Code Here


      ExpressionFactory expressionFactory =
          facesContext.getApplication().getExpressionFactory();
      ELContext context = facesContext.getELContext();

      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value, Void.TYPE,
              new Class<?>[]
              { ActionEvent.class });
      methodExpression.invoke(context, new Object[]
      { event });
    }
View Full Code Here

      FacesContext facesContext = FacesContext.getCurrentInstance();
      ExpressionFactory expressionFactory =
          facesContext.getApplication().getExpressionFactory();
      ELContext context = facesContext.getELContext();
      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value,
              String.class, new Class<?>[]
              {});
      value = (String) methodExpression.invoke(context, null);
    }
View Full Code Here

      FacesContext facesContext = FacesContext.getCurrentInstance();
      ExpressionFactory expressionFactory =
          facesContext.getApplication().getExpressionFactory();
      ELContext context = facesContext.getELContext();
      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value,
              String.class, new Class<?>[]
              {});
      value = (String) methodExpression.invoke(context, null);
    }
View Full Code Here

      ExpressionFactory expressionFactory =
          facesContext.getApplication().getExpressionFactory();
      ELContext context = facesContext.getELContext();

      MethodExpression methodExpression =
          expressionFactory.createMethodExpression(context, value, Void.TYPE,
              new Class<?>[]
              { ActionEvent.class });
      methodExpression.invoke(context, new Object[]{ event });
    }
View Full Code Here

              break;
            }
          }
          if (expressionString != null) {
            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
            MethodExpression action = new TagMethodExpression(value, expressionFactory.createMethodExpression(
                faceletContext, expressionString, String.class, ComponentUtil.ACTION_ARGS));
            // TODO jsf 1.2
            ((ActionSource) parent).setAction(new LegacyMethodBinding(action));
          }
        } else if ("actionListener".equals(mode.getValue())) {
View Full Code Here

              break;
            }
          }
          if (expressionString != null) {
            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
            MethodExpression actionListener = new TagMethodExpression(value, expressionFactory.createMethodExpression(
                faceletContext, expressionString, null, ComponentUtil.ACTION_LISTENER_ARGS));
            // TODO jsf 1.2
            ((ActionSource) parent).setActionListener(new LegacyMethodBinding(actionListener));
          }
        } else if ("actionFromValue".equals(mode.getValue())) {
View Full Code Here

    // 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

    beanExpression = expressionFactory.createValueExpression(facesContext
        .getELContext(), "#{registeraction}", RegisterAction.class);
    states.put("action", beanExpression);

    // Define method expression inside registeraction binding for this state
    MethodExpression methodExpression = expressionFactory
        .createMethodExpression(facesContext.getELContext(),
            "#{registeraction.ok}", String.class, new Class[] {});
    states.put("ok", methodExpression);

    // Outcome for switching to login state definition
View Full Code Here

    beanExpression = expressionFactory.createValueExpression(facesContext
        .getELContext(), "#{loginaction}", LoginAction.class);
    states.put("action", beanExpression);

    methodExpression = expressionFactory.createMethodExpression(
        facesContext.getELContext(), "#{loginaction.ok}", String.class,
        new Class[] {});
    states.put("ok", methodExpression);

    states.setNavigation("switch", "register");
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.