Tapestry 5
  1. Tapestry 5
  2. TAP5-1596

Tapestry should validate that component ids reference in event handler method names (or @OnEvent annotation) exist

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.3, 5.2
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:

      Description

      The scenario is a component, say "register", and a event handler method, say "onValidateFromRegistry". Since "registry" is not a known component id, this should be flagged as an error early, say, during page construction, or perhaps on page load.

        Activity

        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #454 (See https://builds.apache.org/job/tapestry-trunk-freestyle/454/)
        TAP5-1596: Update some tests that were broken by the new component id validation
        TAP5-1596: Allow the new component id check to be optional, to ease upgrading from 5.2
        TAP5-1596: Enhance OnEventWorker to check that component ids for event handler methods match against actual component ids
        TAP5-1596: Correct some test pages that referenced a non-existent component id via an event handler method
        TAP5-1596: Remove event handler for non-existent ActionLink 'reset'
        TAP5-1596: Add a page to demonstrate the fix

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154800
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/InplaceGridDemo.tml
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LeanGridDemo.tml
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridDemo.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/InplaceGridDemo.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridRemoveReorderDemo.tml
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridDemo.tml
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridRemoveReorderDemo.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LeanGridDemo.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154799
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154797
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/ComponentParameterTests.groovy
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154796
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridDemo.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app2/pages/TestPageForLocale_fr.tml

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154793
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormInjectorDemo.java

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154791
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/EventMethodUnmatchedComponentId.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/EventMethodUnmatchedComponentId.tml
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #454 (See https://builds.apache.org/job/tapestry-trunk-freestyle/454/ ) TAP5-1596 : Update some tests that were broken by the new component id validation TAP5-1596 : Allow the new component id check to be optional, to ease upgrading from 5.2 TAP5-1596 : Enhance OnEventWorker to check that component ids for event handler methods match against actual component ids TAP5-1596 : Correct some test pages that referenced a non-existent component id via an event handler method TAP5-1596 : Remove event handler for non-existent ActionLink 'reset' TAP5-1596 : Add a page to demonstrate the fix hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154800 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/InplaceGridDemo.tml /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/LeanGridDemo.tml /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/InplaceGridDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridRemoveReorderDemo.tml /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/GridTests.java /tapestry/tapestry5/trunk/tapestry-core/src/test/app1/GridDemo.tml /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridRemoveReorderDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/LeanGridDemo.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154799 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/SymbolConstants.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154797 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/groovy/org/apache/tapestry5/integration/app1/ComponentParameterTests.groovy /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/transform/OnEventWorker.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154796 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/GridDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app2/pages/TestPageForLocale_fr.tml hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154793 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/FormInjectorDemo.java hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1154791 Files : /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/Index.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/EventMethodUnmatchedComponentId.java /tapestry/tapestry5/trunk/tapestry-core/src/test/resources/org/apache/tapestry5/integration/app1/pages/EventMethodUnmatchedComponentId.tml
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Howard M. Lewis Ship [ hlship ]
        Fix Version/s 5.3 [ 12316024 ]
        Resolution Fixed [ 1 ]
        Howard M. Lewis Ship created issue -

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development