Tapestry
  1. Tapestry
  2. TAPESTRY-2120

Disabled radio group causes 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 RC, WinXP, Firefox 2

      Description

      This is related to TAPESTRY-2073. Recent changes to the way ids are allocated in Tapestry have caused unexpected StaleLinkExceptions to occur given certain combinations of components on the page. The following, derived from the example on TAPESTRY-2073, reproduces the behavior:

      NestedIfBorder.html:
      <shell jwcid="@Shell" title="NestedIfTest">
      <body jwcid="@Body">
      <topComponent jwcid="@TopComponent" />
      <component jwcid="@BorderComponent" />
      <span jwcid="@RenderBody"/>
      </body>
      </shell>

      TopComponent.html:
      <span jwcid="@If" condition="true" id="testId"> </span> <span jwcid="@If" condition="true"> </span>

      BorderComponent.html:
      <if jwcid="@If" condition="true">
      <nestedComponent jwcid="@NestedComponent" /> </if>

      NestedComponent.html:
      <if jwcid="@If" condition="true">
      test
      </if>

      RadioTest.html:
      <border jwcid="@NestedIfBorder">
      <outerIf jwcid="@If" condition="ognl:true">
      <false1 jwcid="@If" condition="ognl:false" />
      <false2 jwcid="@If" condition="ognl:false" />
      <innerIf jwcid="@If" condition="ognl:true">
      <innerIf2 jwcid="@If" condition="ognl:true">
      <form jwcid="@Form">
      <formIf jwcid="@If" condition="ognl:true" />
      <else jwcid="@Else"></else>
      <radioIf jwcid="@If" condition="ognl:true">
      <radiogroup jwcid="mediaType@RadioGroup" displayName="Media Type" disabled="ognl:true" selected="ognl:selected" name="mediaType">
      <radio jwcid="@Radio" name="mediaType" />
      <radio2 jwcid="@Radio" name="mediaType" />
      </radiogroup>
      </radioIf>
      <note jwcid="note@TextArea" value="ognl:val" />
      <submitIf jwcid="cancheckout@If" condition="ognl:true">
      <submit jwcid="@Submit" listener="listener:submit" />
      </submitIf>
      </form>
      </innerIf2>
      </innerIf>
      </outerIf>
      </border>

        Activity

        Hide
        Ben Dotte added a comment -

        I just realized it is really only the disabled radio group causing a problem. The example can be simplified to this:

        <shell jwcid="@Shell" title="RadioTest">
        <body jwcid="@Body">
        <form jwcid="@Form">
        <radiogroup jwcid="@RadioGroup" disabled="ognl:true" selected="ognl:selected">
        <radio jwcid="@Radio" />
        <radio2 jwcid="@Radio" />
        </radiogroup>
        <submit jwcid="@Submit" listener="listener:submit" />
        </form>
        </body>
        </shell>

        Show
        Ben Dotte added a comment - I just realized it is really only the disabled radio group causing a problem. The example can be simplified to this: <shell jwcid="@Shell" title="RadioTest"> <body jwcid="@Body"> <form jwcid="@Form"> <radiogroup jwcid="@RadioGroup" disabled="ognl:true" selected="ognl:selected"> <radio jwcid="@Radio" /> <radio2 jwcid="@Radio" /> </radiogroup> <submit jwcid="@Submit" listener="listener:submit" /> </form> </body> </shell>
        Hide
        Ben Dotte added a comment -

        Ok, so apparently (my) fix for TAPESTRY-1529 is at fault here, not the new id allocation stuff. Doh. I'll take a look...

        Show
        Ben Dotte added a comment - Ok, so apparently (my) fix for TAPESTRY-1529 is at fault here, not the new id allocation stuff. Doh. I'll take a look...
        Hide
        Jesse Kuhnert added a comment -

        That's fine - I've gotten it fixed now already anyways. (overrode setName(IForm form) )

        Show
        Jesse Kuhnert added a comment - That's fine - I've gotten it fixed now already anyways. (overrode setName(IForm form) )
        Hide
        Ben Dotte added a comment -

        Awesome... thanks Jesse!

        Show
        Ben Dotte added a comment - Awesome... thanks Jesse!
        Hide
        Jesse Kuhnert added a comment -

        Sure np. . Thanks for all the QA/bug report work.

        Show
        Jesse Kuhnert added a comment - Sure np. . Thanks for all the QA/bug report work.

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development