Tapestry
  1. Tapestry
  2. TAPESTRY-2073

Nested Ifs without explicit ids cause StaleLinkException

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 4.1.5
    • Fix Version/s: 4.1.5
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      Tapestry 4.1.4 snapshot from 1-22, WinXP, Firefox 2

      Description

      The following template generates a StaleLinkException when Submit is clicked:

      <form jwcid="@Form">
      <outerIf jwcid="@If" condition="true">
      <innerIf jwcid="@If" condition="true">
      <span jwcid="@Insert" value="0" />
      </innerIf>
      </outerIf>
      <submit jwcid="@Submit" listener="listener:submit" />
      </form>

      If an explicit id is provided to either If however, it works fine:

      <form jwcid="@Form">
      <outerIf jwcid="@If" condition="true">
      <innerIf jwcid="innerIf@If" condition="true">
      <span jwcid="@Insert" value="0" />
      </innerIf>
      </outerIf>
      <submit jwcid="@Submit" listener="listener:submit" />
      </form>

      The Stale Link page indicated this error with the first template:

      Rewind of form DirectorAccount/$Form expected allocated id #2 to be 'If_0_4', but was 'If_41' (requested by component DirectorAccount/$If_0).

      I suspect this may be caused by the changes made for TAPESTRY-1278, since this exception does not occur in 4.1.3.

        Activity

          People

          • Assignee:
            Jesse Kuhnert
            Reporter:
            Ben Dotte
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development