Package org.apache.commons.el

Examples of org.apache.commons.el.ExpressionEvaluatorImpl$JSTLExpression


    /**
     * Constructor.
     */
    public ELEvaluator() {
        ee = new ExpressionEvaluatorImpl();
    }
View Full Code Here


     *
     * @param fnMapper The function mapper for this Evaluator.
     * @see javax.servlet.jsp.el.FunctionMapper
     */
    public ELEvaluator(final FunctionMapper fnMapper) {
        ee = new ExpressionEvaluatorImpl();
        this.fnMapper = fnMapper;
    }
View Full Code Here

     *
     * @return Log The log being used.
     */
    private ExpressionEvaluator getEvaluator() {
        if (ee == null) {
            ee = new ExpressionEvaluatorImpl();
        }
        return ee;
    }
View Full Code Here

                throw ValidationException.required(nameText, "Please enter a name.");
            }
            if ((uriText.getText().length() == 0) && !editingDefault) {
                throw ValidationException.required(uriText, "Please enter a URL.");
            }
            ExpressionEvaluator eval = new ExpressionEvaluatorImpl();
            try {
                eval.evaluate((String) nameText.getText(), String.class, new DefaultVariables(),
                              StaticFunctionMapper.getDefault());
            } catch (Exception e) {
                throw ValidationException.invalid(nameText, "Error evaluating EL expression:\n" + e.getMessage());
            }
            try {
                eval.evaluate((String) uriText.getText(), String.class, new DefaultVariables(),
                              StaticFunctionMapper.getDefault());
            } catch (Exception e) {
                throw ValidationException.invalid(uriText, "Error evaluating EL expression:\n" + e.getMessage());
            }
View Full Code Here

    }

    public void actionPerformed(ActionEvent ev) {
      try {
        StaticFunctionMapper functionMapper = StaticFunctionMapper.getDefault();
        ExpressionEvaluator eval = new ExpressionEvaluatorImpl();
        VariableResolver resolver = new DefaultVariables(uriText.getText(), null, null);
        resultText.setText((String) eval.evaluate(elText.getText(), String.class, resolver, functionMapper));
      } catch (ELException e) {
        ExceptionDialog.show(TestingTool.this, e);
      }
    }
View Full Code Here

    this.log = log;
  }

  // JavaDoc inherited
  public void handle(String data, ContentHandler handler) {
    ExpressionEvaluator evaluator = new ExpressionEvaluatorImpl();
    Object value;
    try {
      value = evaluator.evaluate(data, Object.class, resolver, mapper);
      if (value != null) {
        char[] result = value.toString().toCharArray();
        handler.characters(result, 0, result.length);
      } else {
        log.debug("Failed to resolve " + data);
View Full Code Here

        this.log = log;
    }

    // JavaDoc inherited
    public void handle(String data, ContentHandler handler) {
        ExpressionEvaluator evaluator = new ExpressionEvaluatorImpl();
        Object value;
        try {
            value = evaluator.evaluate(data, Object.class, resolver, mapper);
            char[] result = value.toString().toCharArray();
            handler.characters(result, 0, result.length);
        } catch (ELException ele) {
            log.error("Failed to handle EL expression.", ele);
        } catch (SAXException saxe) {
View Full Code Here

   *
   * @param data DOCUMENT ME!
   * @param handler DOCUMENT ME!
   */
  public void handle(String data, ContentHandler handler) {
    ExpressionEvaluator evaluator = new ExpressionEvaluatorImpl();
    Object value;

    try {
      value = evaluator.evaluate(data, Object.class, resolver, mapper);

      if (value != null) {
        char[] result = value.toString().toCharArray();
        handler.characters(result, 0, result.length);
      } else {
View Full Code Here

    String expr = expr_.replaceAll("\\#\\{", "\\$\\{");
    Object value = null;
    if (retType == null) {
      retType = java.lang.String.class;
    }
    ExpressionEvaluatorImpl exprEvaluator = new ExpressionEvaluatorImpl();
    VariableResolver varResolver = ctx.getVariableResolver();
    try {
      value = exprEvaluator.evaluate(expr, retType, varResolver, null);
    } catch (javax.servlet.jsp.el.ELException e) {
      MessageFormat msgFormat = new MessageFormat(ERR_BAD_EXPR);
          log.warn(msgFormat.format(new Object[] {e.getMessage()}));
      return null;
    } // end of try-catch
View Full Code Here

   *
   * @param data DOCUMENT ME!
   * @param handler DOCUMENT ME!
   */
  public void handle(String data, ContentHandler handler) {
    ExpressionEvaluator evaluator = new ExpressionEvaluatorImpl();
    Object              value;

    try {
      value                       = evaluator.evaluate(data, Object.class, resolver, mapper);

      if (value != null) {
        char[] result = value.toString().toCharArray();
        handler.characters(result, 0, result.length);
      } else {
View Full Code Here

TOP

Related Classes of org.apache.commons.el.ExpressionEvaluatorImpl$JSTLExpression

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.