Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-962

enhance ExpressionEvaluator

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Later
    • 4.0.2
    • 4.1.2
    • Framework
    • None

    Description

      ExpressionEvaluator abstracts OGNL by providing an OGNL independent interface for evaluating expressions. It is very useful not only for bindings but for custom usage as well. I'd like to propose some enhancements to make it more useable:

      • add more configuration options, for example allow specifying a custom OGNL class resolver
      • allow custom context variables like

      public Object read(Object target, String expression, Map<String, ?> variables);

      The values in "variables" would be accessible as OGNL global variables, eg. #mycustomvariable
      For more information see http://www.ognl.org/2.6.9/Documentation/html/LanguageGuide/varref.html
      (- maybe the interface should be renamed to OgnlExpressionEvaluator)
      (- maybe there could be configurable default variables when evaluating bindings, like #locale -> requestCycle.engine.locale. These would help for application developers to simplify the page files. I know that it is another way to implement existing functionality - <inject> - but maybe it would be useful.)

      The two latter are only quick ideas but the rest would be very useful!

      If you think so then I send my own ExpressionEvaluator implementation (which is compatible with the current one in Tapestry).

      Regards,
      Norbi

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            snorbi Norbert Sándor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: