Examples of TagMethodExpression


Examples of com.sun.facelets.el.TagMethodExpression

    // 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 com.sun.facelets.el.TagMethodExpression

              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())) {
          String expressionString = value.getValue();
          while (isSimpleExpression(expressionString)) {
            if (isMethodOrValueExpression(expressionString)) {
              ValueExpression expression
                  = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
              if (expression == null) {
                if (LOG.isDebugEnabled()) {
                  // when the action hasn't been set while using a componsition.
                  LOG.debug("Variable can't be resolved: value='" + expressionString + "'");
                }
                expressionString = null;
                break;
              } else {
                expressionString = expression.getExpressionString();
              }
            } else {
              LOG.warn("Only expressions are supported mode=actionListener value='" + expressionString + "'");
              expressionString = null;
              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

Examples of com.sun.facelets.el.TagMethodExpression

    // 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 com.sun.facelets.el.TagMethodExpression

     */
    public MethodExpression getMethodExpression(FaceletContext ctx, Class type,
            Class[] paramTypes) {
        try {
            ExpressionFactory f = ctx.getExpressionFactory();
            return new TagMethodExpression(this, f.createMethodExpression(ctx,
                    this.value, type, paramTypes));
        } catch (Exception e) {
            throw new TagAttributeException(this, e);
        }
    }
View Full Code Here

Examples of com.sun.facelets.el.TagMethodExpression

     */
    public MethodExpression getMethodExpression(FaceletContext ctx, Class type,
            Class[] paramTypes) {
        try {
            ExpressionFactory f = ctx.getExpressionFactory();
            return new TagMethodExpression(this, f.createMethodExpression(ctx,
                    this.value, type, paramTypes));
        } catch (Exception e) {
            throw new TagAttributeException(this, e);
        }
    }
View Full Code Here

Examples of com.sun.facelets.el.TagMethodExpression

              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())) {
          String expressionString = value.getValue();
          while (isSimpleExpression(expressionString)) {
            if (isMethodOrValueExpression(expressionString)) {
              ValueExpression expression
                  = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
              if (expression == null) {
                if (LOG.isDebugEnabled()) {
                  // when the action hasn't been set while using a componsition.
                  LOG.debug("Variable can't be resolved: value='" + expressionString + "'");
                }
                expressionString = null;
                break;
              } else {
                expressionString = expression.getExpressionString();
              }
            } else {
              LOG.warn("Only expressions are supported mode=actionListener value='" + expressionString + "'");
              expressionString = null;
              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

Examples of com.sun.facelets.el.TagMethodExpression

    // 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 com.sun.facelets.el.TagMethodExpression

              break;
            }
          }
          if (expressionString != null) {
            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
            MethodExpression action = new TagMethodExpression(value, expressionFactory.createMethodExpression(
                faceletContext, expressionString, String.class, ComponentUtils.ACTION_ARGS));
            // TODO jsf 1.2
            ((ActionSource) parent).setAction(new LegacyMethodBinding(action));
          }
        } else if ("actionListener".equals(mode.getValue())) {
          String expressionString = value.getValue();
          while (isSimpleExpression(expressionString)) {
            if (isMethodOrValueExpression(expressionString)) {
              ValueExpression expression
                  = faceletContext.getVariableMapper().resolveVariable(removeElParenthesis(expressionString));
              if (expression == null) {
                if (LOG.isDebugEnabled()) {
                  // when the action hasn't been set while using a composition.
                  LOG.debug("Variable can't be resolved: value='" + expressionString + "'");
                }
                expressionString = null;
                break;
              } else {
                expressionString = expression.getExpressionString();
              }
            } else {
              LOG.warn("Only expressions are supported mode=actionListener value='" + expressionString + "'");
              expressionString = null;
              break;
            }
          }
          if (expressionString != null) {
            ExpressionFactory expressionFactory = faceletContext.getExpressionFactory();
            MethodExpression actionListener = new TagMethodExpression(value, expressionFactory.createMethodExpression(
                faceletContext, expressionString, null, ComponentUtils.ACTION_LISTENER_ARGS));
            // TODO jsf 1.2
            ((ActionSource) parent).setActionListener(new LegacyMethodBinding(actionListener));
          }
        } else if ("actionFromValue".equals(mode.getValue())) {
View Full Code Here

Examples of com.sun.facelets.el.TagMethodExpression

    // 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 com.sun.faces.facelets.el.TagMethodExpression

            // Determine if this is a composite component attribute lookup.
            // If so, look for a MethodExpression under the attribute key
            if (ELUtils.isCompositeComponentMethodExprLookup(this.value)) {
                result = new AttributeLookupMethodExpression(getValueExpression(ctx, MethodExpression.class));
            } else if (ELUtils.isCompositeComponentExpr(this.value)) {
                MethodExpression delegate = new TagMethodExpression(this,
                                                 f.createMethodExpression(ctx,
                                                                          this.value,
                                                                          type,
                                                                          paramTypes));
                result = new ContextualCompositeMethodExpression(getLocation(), delegate);
            } else {
                result = new TagMethodExpression(this,
                                                 f.createMethodExpression(ctx,
                                                                          this.value,
                                                                          type,
                                                                          paramTypes));
            }
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.