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 Pryor <BP...@widen.com> on 2005/08/25 23:09:48 UTC

Tapestry 4 FieldLabel needs to call prerenderField even during rewind

This is an issue that came up during our Tapestry 4 migration.  It may
already be known and covered - I looked at TAPESTRY-517
(http://issues.apache.org/jira/browse/TAPESTRY-517) which seems at least
related.  However it may not be quite the same, so I'd like some
feedback on this issue.  I can open a new JIRA case if desired.
 
If there are any form components between a FieldLabel and its
corresponding field, a StaleLinkException will be thrown upon rewind.
The reason is that the FieldLabel prerenders its field, but on rewind
the FieldLabel does nothing.  This causes the component render order to
be different during rewind.
 
Example:
<span jwcid="@FieldLabel" field="ognl:components.myField" />
<span jwcid=someOtherFormField@TextField
<ma...@TextField>  />
<span jwcid=myField@TextField <ma...@TextField>  />
 
During render myField renders followed by someOtherFormField, and during
rewind it's reversed.
 
Obviously a silly example, but there are more practical cases where it
comes up.  This is just the simplest case that demonstrates the problem.
 
I think this could be fixed easily enough by having the FieldLabel
always call form.prerenderField, even during the rewind.
 
Ben
 
 

Re: Tapestry 4 FieldLabel needs to call prerenderField even during rewind

Posted by Howard Lewis Ship <hl...@gmail.com>.
Please add a bug and I will get this into beta-5.

On 8/25/05, Ben Pryor <BP...@widen.com> wrote:
> This is an issue that came up during our Tapestry 4 migration.  It may
> already be known and covered - I looked at TAPESTRY-517
> (http://issues.apache.org/jira/browse/TAPESTRY-517) which seems at least
> related.  However it may not be quite the same, so I'd like some
> feedback on this issue.  I can open a new JIRA case if desired.
> 
> If there are any form components between a FieldLabel and its
> corresponding field, a StaleLinkException will be thrown upon rewind.
> The reason is that the FieldLabel prerenders its field, but on rewind
> the FieldLabel does nothing.  This causes the component render order to
> be different during rewind.
> 
> Example:
> <span jwcid="@FieldLabel" field="ognl:components.myField" />
> <span jwcid=someOtherFormField@TextField
> <ma...@TextField>  />
> <span jwcid=myField@TextField <ma...@TextField>  />
> 
> During render myField renders followed by someOtherFormField, and during
> rewind it's reversed.
> 
> Obviously a silly example, but there are more practical cases where it
> comes up.  This is just the simplest case that demonstrates the problem.
> 
> I think this could be fixed easily enough by having the FieldLabel
> always call form.prerenderField, even during the rewind.
> 
> Ben
> 
> 
> 
> 


-- 
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind

Professional Tapestry training, mentoring, support
and project work.  http://howardlewisship.com

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