Uploaded image for project: 'Commons OGNL (Dormant)'
  1. Commons OGNL (Dormant)
  2. OGNL-84

Indexed expressions ("prop[index]") do not lookup for the getProp(int index) method in the right class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.7
    • ExpressionCompiler
    • None
    • Tapestry 4.1.2, JRE1.5.0.7

    Description

      2 examples to illustrate this:

      1) I have a Tapestry page (MyPage) that inherits from a base page (MyBasePage) that itself inherits from tapestry's BasePage.

      MyPage has a property (matrix) of type Matrix. Class Matrix has a method called getLine(int index).

      The OGNL expression in MyPage "matrix.line[index]" throws the following exception:

      javassist.CannotCompileException: [source error] getLine(java.lang.Integer) not found in MyBasePage

      getLine(int) should have been looked up in the Matrix class, not in MyBasePage

      Replacing with the expression "matrix.getLine(index)" works.

      2) I have another tapestry page (MyOtherPage) that inherits from a base page (MyOtherBasePage) that itself inherits from a class hierarchy that eventually ends up with tapestry's base page

      MyOtherPage has a method called getStyle(int index)

      The OGNL expression in MyOtherPage "style[index]" throws the following exception

      javassist.CannotCompileException: [source error] getStyle(int) not found in MyOtherBasePage

      Again, replacing with "getStyle(index)" works.

      Attachments

        Activity

          People

            jkuhnert Jesse Kuhnert
            cdu Christian Dutaret
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: