Tapestry 5
  1. Tapestry 5
  2. TAP5-128

Render phase short circuiting fails to abort the event when mixins are present on the component, resulting in an IllegalStateException when trying to store a subsequent result value

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.16
    • Component/s: None
    • Labels:
      None

      Description

      According to the docs on render phase short-circuiting for methods of the same phase:
      http://tapestry.apache.org/tapestry5/tapestry-core/guide/rendering.html

      "If a method returns a true or false value, this will short circuit processing.
      Other methods within the phase that would ordinarily be invoked will not be invoked."

      This is currently unimplemented. (Only other "inner" phases are short-circuited & not invoked.)

      Changes would primarily affect:
      org.apache.tapestry.internal.structure.ComponentCallback
      org.apache.tapestry.internal.structure.ComponentPageElementImpl

      In ComponentPageElementImpl.invoke(...), the loop:
      while (i.hasNext())
      callback.run(i.next());

      needs to implement the short circuiting, for example:
      while (i.hasNext())
      if (callback.run(i.next()))
      break;

      This change would cascade up to ComponentCallback and all its usage in ComponentPageElementImpl.

      Cheers,
      Nick.

      1. jira1662sample.tgz
        7 kB
        Robert Zeigler

        Activity

        Nick Westgate created issue -
        Howard M. Lewis Ship made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Assignee Howard M. Lewis Ship [ hlship ]
        Resolution Duplicate [ 3 ]
        Nick Westgate made changes -
        Resolution Duplicate [ 3 ]
        Status Closed [ 6 ] Reopened [ 4 ]
        Robert Zeigler made changes -
        Attachment jira1662sample.tgz [ 12381973 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Howard M. Lewis Ship made changes -
        Project Tapestry [ 10573 ] Tapestry 5 [ 12310833 ]
        Key TAPESTRY-1662 TAP5-128
        Affects Version/s 5.0.5 [ 12312477 ]
        Component/s tapestry-core [ 12311285 ]
        Howard M. Lewis Ship made changes -
        Assignee Howard M. Lewis Ship [ hlship ]
        Summary Render phase short-circuiting is not implemented for methods of the same phase. Render phase short circuiting fails to abort the event when mixins are present on the component, resulting in an IllegalStateException when trying to store a subsequent result value
        Howard M. Lewis Ship made changes -
        Fix Version/s 5.0.16 [ 12313427 ]
        Status Reopened [ 4 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Nick Westgate
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development