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

Howard M. Lewis Ship commented on TAPESTRY-703:
-----------------------------------------------

The key thing is that @If condition="ognl:editting".  What is probably true 
when the form is rendered, but false when the form is submitted.

This exposes a bit of a limitation in Tapestry; we're jumping around all over 
the place to get the FieldLabel to coordinate with the TextField.

http://howardlewisship.com/blog/2005/04/interesting-idea-fieldlabel-validfield.html

There isn't a good way to get the TextField to honor the fact that its inside 
an If.  It always renders and always rewinds, due to the FieldLabel, wihch "pre 
renders" the TextField even though its inside an If.

I think things would work better if the @If went around the <tr> (or hid as the 
<tr> using the element attribute).  And make sure the editting property is set 
properly (perhaps using a Hidden).

> @If component when use with the @FieldLabel and @TextField components
> ---------------------------------------------------------------------
>
>          Key: TAPESTRY-703
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-703
>      Project: Tapestry
>         Type: Bug
>     Versions: 4.0
>  Environment: Solaris 10, Tomcat 5
>     Reporter: Otto Gonzalez
>     Assignee: Howard M. Lewis Ship

>
> I am not sure if this is a bug in  4.0. But  it works fine under Tapestry 
> 3.02.  
> If have an @If  component in between a  @FieldLabel and a TextField 
> component,  the TextField component fails to show  data.  I know that my 
> condition evaluate to true and the  FieldLabel component shows the 
> displayName value defined in the TextField Component properly.
> By the way, this only happens when I use the Submit component.  
> If I change the code to have the  @If evaluate first and then the @FieldLabel 
> and TextField component, I get the same problems. 
> But If I remove the @If component, everything works fine. As I said, I don't 
> have this problem under tapestry 3.0 or 3.02
> Here is an example from my HTML
> <tr>
> <td class="label"><span jwcid="@FieldLabel" field="component:lastName">Last 
> Name</span></td> 
> <span jwcid=" @If" condition="ognl:editing">
> <td class="input"><input jwcid="lastName" size="50" maxlength="100"/></td>    
>                                 </span>
> </tr>
> This next code works fine.
> <tr>
> <td class="label"><span jwcid="@FieldLabel"  field="component:lastName">Last 
> Name</span></td> 
> <td class="input"><input jwcid="lastName" size="50" maxlength="100"/></td>  
> </tr>
> As I said, this only  happens under 4.0 
> Thanks

-- 
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