You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Otto Gonzalez (JIRA)" <ta...@jakarta.apache.org> on 2005/10/14 19:42:44 UTC

[jira] Created: (TAPESTRY-703) @If component when use with the @FieldLabel and @TextField components

@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


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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Assigned: (TAPESTRY-703) @If component when use with the @FieldLabel and @TextField components

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-703?page=all ]

Howard M. Lewis Ship reassigned TAPESTRY-703:
---------------------------------------------

    Assign To: Howard M. Lewis Ship

> @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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-703) @If component when use with the @FieldLabel and @TextField components

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ 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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-703) @If component when use with the @FieldLabel and @TextField components

Posted by "Otto Gonzalez (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-703?page=comments#action_12356197 ] 

Otto Gonzalez commented on TAPESTRY-703:
----------------------------------------

My only solution at this point is to use the special tapestry attribute key and disable the FieldLabel component. 
<tr>
     <td class="label"><span key="Employee.lastName">Last Name</span></td>
     <!--<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>

I am not sure if the bug is in the FieldLabel component or on the framework somewhere. As I already stated, I do not have this problem under 3.02.


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

>
> 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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Resolved: (TAPESTRY-703) @If component when use with the @FieldLabel and @TextField components

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
     [ http://issues.apache.org/jira/browse/TAPESTRY-703?page=all ]
     
Howard M. Lewis Ship resolved TAPESTRY-703:
-------------------------------------------

    Resolution: Won't Fix

I think it is less than desirable that Tapestry's behavior limits your ability to use the If component wherever you want, but this relationship between FieldLabel and any form element component jumbles things up, yet is highly desirable.  

Also, ignore my comment about using a Hidden ... the If component does that autmatically (duh!  thanks MB!)

> @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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-703) @If component when use with the @FieldLabel and @TextField components

Posted by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-703?page=comments#action_12356347 ] 

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

Tapestry 3.x doesn't do the pre-rendering of the form control component (the TextField).  That causes a lot of grief getting the FieldLabel to decorate correctly with the TextField when they are both inside a loop.

> @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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org


[jira] Commented: (TAPESTRY-703) @If component when use with the @FieldLabel and @TextField components

Posted by "Otto Gonzalez (JIRA)" <ta...@jakarta.apache.org>.
    [ http://issues.apache.org/jira/browse/TAPESTRY-703?page=comments#action_12356345 ] 

Otto Gonzalez commented on TAPESTRY-703:
----------------------------------------

Pardon for my ignorance, but why does it works fine under Tapestry 3.X?

> @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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org