Tapestry
  1. Tapestry
  2. TAPESTRY-856

lazy initialization of abstract properties

    Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.1
    • Fix Version/s: 4.1.2
    • Component/s: Framework
    • Labels:
      None

      Description

      when using parametr bindings, one can use ognl, (which is slowmotion), to navigate through an object graph.
      A (fast) alterntive is use an abstract property with an initializer method:

      component A :

      { @InitialValue("getXFromDatabase()") public abstract X getX(); }

      now if X is dependant on the bindings of component A, this will not work, since X property will often be initialized before the bindings are available - or sometimes, also when not posssible to get, because, say, component A is inside an If which does not allow it to render, if unable to... (say x ID is not given...)

      please add a lazy initialization option for abstract properties to allow this be treated more smoothly...

        Activity

        Hide
        Ron Piterman added a comment -

        this has nothing with HOW the expresion is evaluated, but WHEN it is evaluated and when the property is being reset (to null) - therefore has also nothing with ognl.

        Show
        Ron Piterman added a comment - this has nothing with HOW the expresion is evaluated, but WHEN it is evaluated and when the property is being reset (to null) - therefore has also nothing with ognl.
        Hide
        Jesse Kuhnert added a comment -

        I think ognl offers the best solution for this one and is also no longer a problem wrt performance. If I'm mistaken please feel free to re-open and we can discuss other possibilities...but obviously most will require similar logic to that provided by ognl.

        Show
        Jesse Kuhnert added a comment - I think ognl offers the best solution for this one and is also no longer a problem wrt performance. If I'm mistaken please feel free to re-open and we can discuss other possibilities...but obviously most will require similar logic to that provided by ognl.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Ron Piterman
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development