[ 
http://issues.apache.org/jira/browse/TAPESTRY-600?page=comments#action_12320579 
] 

Ben Pryor commented on TAPESTRY-600:
------------------------------------

I don't think this is exactly the same issue as TAPESTRY-517. 

Here's the smallest chunk of template that demonstrates the issue:

<form jwcid="@Form">
                <span jwcid="@FieldLabel" field="ognl:components.myfield" />
                <test jwcid="@If" condition="ognl:true"></test>
                <span jwcid="[EMAIL PROTECTED]" value="ognl:myprop" 
displayName="test" />
                <input jwcid="@Submit" />
</form>

The reason the above patch is incomplete is that the wasPrerendered method in 
FormSupportImpl needs to be changed as well.  Often when a form component 
rewinds, it produces no markup.  The wasPrerendered method checks to see that 
the buffer previously stored in the _prerenderMap by the component is not null, 
but during rewind it may be null.  Correct way is to check to see if the map 
contains the key.  I will attach a second patch for FormSupportImpl.

> FieldLabel component needs to call Form.prerenderField even when rewinding
> --------------------------------------------------------------------------
>
>          Key: TAPESTRY-600
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-600
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>     Reporter: Ben Pryor
>  Attachments: patch.txt
>
> The FieldLabel component prerenders its associated field to allow validation 
> decoration to work properly.  However, it only prerenders the field during 
> the render cycle and not during the rewind cycle. If there are any form 
> components after the FieldLabel but before the FieldLabel's field, the render 
> sequence will differ upon rewind and throw a StaleLinkException. The fix 
> should be that FieldLabel always calls to form.prerenderField, ensuring a 
> consistent render sequence.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to