You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Ben Dotte (JIRA)" <de...@tapestry.apache.org> on 2008/01/22 22:54:35 UTC

[jira] Created: (TAPESTRY-2073) Nested Ifs without explicit ids cause StaleLinkException

Nested Ifs without explicit ids cause StaleLinkException
--------------------------------------------------------

                 Key: TAPESTRY-2073
                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2073
             Project: Tapestry
          Issue Type: Bug
          Components: Framework
    Affects Versions: 4.1.4
         Environment: Tapestry 4.1.4 snapshot from 1-22, WinXP, Firefox 2
            Reporter: Ben Dotte
            Priority: Critical


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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2073) Nested Ifs without explicit ids cause StaleLinkException

Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12561820#action_12561820 ] 

Jesse Kuhnert commented on TAPESTRY-2073:
-----------------------------------------

Hey Ben,

I've tried to re-create this but am not getting the StaleLink exceptions that you are.   

I added the first example snippet to the TimeTracker Home.html page at the bottom (and top / middle) with various ifs before and after it but still no luck.  

Perhaps the structure of your page has some other things happening that make it harder to re-produce? (or perhaps you aren't using the latest snapshot version to test? sounds unlikely but who knows)

Will wait to see if there is another way to get it to happen. 

> Nested Ifs without explicit ids cause StaleLinkException
> --------------------------------------------------------
>
>                 Key: TAPESTRY-2073
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2073
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.1.4
>         Environment: Tapestry 4.1.4 snapshot from 1-22, WinXP, Firefox 2
>            Reporter: Ben Dotte
>            Priority: Critical
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Assigned: (TAPESTRY-2073) Nested Ifs without explicit ids cause StaleLinkException

Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Kuhnert reassigned TAPESTRY-2073:
---------------------------------------

    Assignee: Jesse Kuhnert

> Nested Ifs without explicit ids cause StaleLinkException
> --------------------------------------------------------
>
>                 Key: TAPESTRY-2073
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2073
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.1.4
>         Environment: Tapestry 4.1.4 snapshot from 1-22, WinXP, Firefox 2
>            Reporter: Ben Dotte
>            Assignee: Jesse Kuhnert
>            Priority: Critical
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Resolved: (TAPESTRY-2073) Nested Ifs without explicit ids cause StaleLinkException

Posted by "Jesse Kuhnert (JIRA)" <de...@tapestry.apache.org>.
     [ https://issues.apache.org/jira/browse/TAPESTRY-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Kuhnert resolved TAPESTRY-2073.
-------------------------------------

       Resolution: Fixed
    Fix Version/s: 4.1.4

Found it!  Thanks for the grunt work on re-producing n stuff.

> Nested Ifs without explicit ids cause StaleLinkException
> --------------------------------------------------------
>
>                 Key: TAPESTRY-2073
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2073
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.1.4
>         Environment: Tapestry 4.1.4 snapshot from 1-22, WinXP, Firefox 2
>            Reporter: Ben Dotte
>            Assignee: Jesse Kuhnert
>            Priority: Critical
>             Fix For: 4.1.4
>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


[jira] Commented: (TAPESTRY-2073) Nested Ifs without explicit ids cause StaleLinkException

Posted by "Ben Dotte (JIRA)" <de...@tapestry.apache.org>.
    [ https://issues.apache.org/jira/browse/TAPESTRY-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12562144#action_12562144 ] 

Ben Dotte commented on TAPESTRY-2073:
-------------------------------------

You're right, I could not get this to reproduce using the snippet in isolation. Components included in our border were contributing to the id allocation scheme breaking down somewhere but I have finally reproduced it using a more complex combination of components (I have not included the .java source as they basically have nothing in them):

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>

NestedIfTest.html:
<border jwcid="@NestedIfBorder">
	<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>
</border>

Sorry for the lengthy snippet but I could not get this to reproduce with anything simpler. Any small change in this example seems to make the StaleLinkException go away.

Please try this out and see if you can reproduce it now. Thanks!

> Nested Ifs without explicit ids cause StaleLinkException
> --------------------------------------------------------
>
>                 Key: TAPESTRY-2073
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-2073
>             Project: Tapestry
>          Issue Type: Bug
>          Components: Framework
>    Affects Versions: 4.1.4
>         Environment: Tapestry 4.1.4 snapshot from 1-22, WinXP, Firefox 2
>            Reporter: Ben Dotte
>            Priority: Critical
>
> 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.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org