Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.0.2, 4.0.1, 4.0
    • Fix Version/s: 4.1
    • Component/s: Framework
    • Labels:
      None

      Description

      When navigate with OGNL in a object graph can result in a null pointer exception, do a improvement a la Webwork that if the object is null create a new one. Probably implementing the NullHandler interface (http://www.opensymphony.com/ognl/html/DeveloperGuide/nullHandler.html).

      According to http://jakarta.apache.org/tapestry/tapestry/hivedocs/module/tapestry.ognl.html
      tapestry only support custom property accessors

        Activity

        Hide
        Andreas Andreou added a comment -

        There's a configuration point now, "tapestry.ognl.NullHandlers".
        For instance:
        <contribution configuration-id="tapestry.ognl.NullHandlers">
        <null-handler class="my.company.class"
        object="instance:my.company.MyNullHandler"/>
        </contribution>

        Your MyNullHandler should implement ognl.NullHandler.
        With this configuration, every time OGNL accesses a property
        (or calls a method) of 'my.company.class' that returns null,
        it will pass control to your handler.

        Show
        Andreas Andreou added a comment - There's a configuration point now, "tapestry.ognl.NullHandlers". For instance: <contribution configuration-id="tapestry.ognl.NullHandlers"> <null-handler class="my.company.class" object="instance:my.company.MyNullHandler"/> </contribution> Your MyNullHandler should implement ognl.NullHandler. With this configuration, every time OGNL accesses a property (or calls a method) of 'my.company.class' that returns null, it will pass control to your handler.

          People

          • Assignee:
            Andreas Andreou
            Reporter:
            Angelo Luís
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development