Details

    • Type: Improvement Improvement
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1-EDR
    • Fix Version/s: 2.1
    • Component/s: EL
    • Labels:
      None
    • Environment:

      Operating System: ALL
      Platform: ALL

    • Issuezilla Id:
      174

      Description

      We should add two methods to ELResolvers to better allow pluggability with EL
      evaluation:

      1) Add a method for pluggable Conversion
      public Object convertToType(ELContext ctx, Object base, Class type) {
      return null;
      }

      2) Add a method for pluggable method resolution
      public Object invoke(ELContext ctx, Object base, Object method, Object[] params) {
      return null;
      }

      Both of these methods would follow the same rules as the others (getValue,
      setValue, etc) around setting propertyResolved, otherwise chaining through.

      The conversion is a big requirement people have wanted. I'm thinking we
      wouldn't modify the coercion logic that exists in the spec, but in the fall
      through logic to Object, or in the case of a setter/method invocation, we would
      utilize the ELResolver's convertToType. Keep in mind, coercion and conversion
      are two different things here.

      For methodinvocation, this is just as important as property resolution, why do
      we accomodate mixing runtime property resolution, while we don't for method
      invocation? This would also support eventual inclusion of method invocation
      within EL and projections (which would be a separate Enhancement Request).

        Activity

        Hide
        jhook added a comment -

        A 3rd method should be added to meet the MethodExpression contract:

        3)
        public MethodInfo getMethodInfo(ELContext ctx, Object base, Object method,
        Object[] params)

        { return null; }
        Show
        jhook added a comment - A 3rd method should be added to meet the MethodExpression contract: 3) public MethodInfo getMethodInfo(ELContext ctx, Object base, Object method, Object[] params) { return null; }
        Hide
        jluehe added a comment -

        -> Kin-Man

        Show
        jluehe added a comment - -> Kin-Man

          People

          • Assignee:
            kchung
            Reporter:
            jhook
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: