Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 4.0.1
    • Fix Version/s: 4.1.2
    • Component/s: Annotations
    • Labels:
      None

      Description

      The output of the attached simple test is "false false".
      I expected "false true".

      What do you think?
      Regards,
      Norbi

      1. test.zip
        2 kB
        Norbert Sándor

        Activity

        Hide
        Norbert Sándor added a comment -

        Simple test...

        Show
        Norbert Sándor added a comment - Simple test...
        Hide
        Andreas Andreou added a comment -

        Tapestry manages the lifecycle of parameters. It extends the component class and adds code that sets parameters to default values (before use) and cleans up (after use, before returning them to the pool)

        So, even if you provide code for those methods, Tapestry will override it, in the dynamically generated subclass.

        A solution to your problem is to use :
        public boolean isReallyDisabled()

        { return isDisabled(); }

        and
        public boolean isReallyDisabled()

        { return true; }

        in the subclass.

        Show
        Andreas Andreou added a comment - Tapestry manages the lifecycle of parameters. It extends the component class and adds code that sets parameters to default values (before use) and cleans up (after use, before returning them to the pool) So, even if you provide code for those methods, Tapestry will override it, in the dynamically generated subclass. A solution to your problem is to use : public boolean isReallyDisabled() { return isDisabled(); } and public boolean isReallyDisabled() { return true; } in the subclass.
        Hide
        Norbert Sándor added a comment -

        Thanks for the fast response! I'll use your tip.

        But the adventage of using annotations (besides others) is that more complex component inheritance usecases are possible than without using annotations.
        Therefore in this case the framework should check if a concrete implementation is available in the subclass.

        Regards,
        Norbi

        Show
        Norbert Sándor added a comment - Thanks for the fast response! I'll use your tip. But the adventage of using annotations (besides others) is that more complex component inheritance usecases are possible than without using annotations. Therefore in this case the framework should check if a concrete implementation is available in the subclass. Regards, Norbi
        Hide
        Jesse Kuhnert added a comment -

        I closed out a similar ticket recently...The enhancement worker stuff that does this override of methods has specific blocks of documentation stating that it knows the methods will be overridden as not overriding them was causing even more issues for people in tapestry 3. I'm wondering what kinds of issues those were and am thinking Howard must have thought they were worse than this...Obviously the ideal is T5 for this kind of thing.

        Show
        Jesse Kuhnert added a comment - I closed out a similar ticket recently...The enhancement worker stuff that does this override of methods has specific blocks of documentation stating that it knows the methods will be overridden as not overriding them was causing even more issues for people in tapestry 3. I'm wondering what kinds of issues those were and am thinking Howard must have thought they were worse than this...Obviously the ideal is T5 for this kind of thing.

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Norbert Sándor
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development