You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Otto <Ot...@Gwinnettcounty.com> on 2005/10/13 16:13:37 UTC
bug in 4.0 ????
I wonder if this is a bug in 4.0 becuase it works fine under 3.02. Here is the
issue.
In this scenario where lastName is of type TextField, the FieldLabel component
shows the displayName defined in the TextField component. But the TextField
does not show my data.
<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>
If I remove the If components, The TextField shows data correctly. I don't have
this problem under 3.02
<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>
Best Regards
Otto
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Otto <Ot...@Gwinnettcounty.com>.
Hi Kent
I checked the code and could not find anything wrong. My only solution at this
point is to use the special tapestry attribute key and disable the FieldLabel
component. Works perfect.
<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.
I also posted a Jira TAPESTRY-703 for this issue.
Thanks
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Kent Tong <ke...@cpttm.org.mo>.
Otto <Otto.Gonzalez <at> Gwinnettcounty.com> writes:
> Thanks you for taking the time write the code. I tested yours and it works
> fine.
> ...
> But when using the Submit, the only way that TextField shows data is if I
> remove the FieldLabel or I take out the If component.
Then the only way is to simplify your code and then post it here.
It is also very likely that in the process you will find the
problem yourself.
--
Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Otto <Ot...@Gwinnettcounty.com>.
Hi Kent
Thanks you for taking the time write the code. I tested yours and it works fine.
Somehow something is still wrong in my application. When I made the conversion
to Tapestry 4, I only added two Hivemind ApplicationObjects and changed a few
deprecated components such as @Condininal and values parameters names.
Everything stayed the same.
One interesting thing is that when I access my page using the ExternalLink
componet , the page shows data in the TextField. (No need to remove the
Fieldlabel or If compoents)
But when using the Submit, the only way that TextField shows data is if I
remove the FieldLabel or I take out the If component.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Kent Tong <ke...@cpttm.org.mo>.
Otto <Otto.Gonzalez <at> Gwinnettcounty.com> writes:
> My condition is evaluating to true and if I remove the FieldLabel
> component, it works fine. This only happens when I submit page.
>
> Same code on 3.02, using <at> If or <at> Conditional components works fine.
I've written a test page and it works fine in Tapestry 4. See if it works
on your computer.
Home.html:
<html>
<form jwcid="form">
<table>
<tr>
<td><span jwcid="@FieldLabel" field="component:lastName">Last
Name</span></td>
<span jwcid="@If" condition="ognl:editing">
<td><input jwcid="lastName" size="50" maxlength="100"/></td>
</span>
</tr>
</table>
<input type="submit"/>
</form>
</html>
Home.page:
<page-specification class="testtextfield.Home">
<property name="lastName" initial-value="'Doe'"/>
<component id="lastName" type="TextField">
<binding name="value" value="lastName"/>
<binding name="displayName" value="'last name'"/>
</component>
<component id="form" type="Form">
<binding name="listener" value="listener:onOk"/>
</component>
</page-specification>
Home.java:
public abstract class Home extends BasePage {
public abstract String getLastName();
public boolean getEditing() {
return true;
}
public void onOk() {
System.out.println(getLastName());
}
}
> By the way, your Tutotials are amazing. I will be buying the book very soon.
Thanks!
--
Author of a book for learning Tapestry (www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Otto <Ot...@Gwinnettcounty.com>.
Hi Kent,
My condition is evaluating to true and if I remove the FieldLabel component, it
works fine. This only happens when I submit page.
Same code on 3.02, using @If or @Conditional components works fine.
<tr>
<span jwcid=" @If" condition="ognl:editing">
<td class="input"><input jwcid="lastName" size="50" maxlength="100"/></td>
</span>
</tr>
By the way, your Tutotials are amazing. I will be buying the book very soon.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Kent Tong <ke...@cpttm.org.mo>.
Otto <Otto.Gonzalez <at> Gwinnettcounty.com> writes:
> The condition evaluate to true. The TextField is empty. This only happens when
> I click on the submit component and when using Tapestry 4. If I remove the
> <at> If component, everything works fine.
Then you may want to show us some minimal code that can demonstrate
this problem.
--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Otto <Ot...@Gwinnettcounty.com>.
Hello,
The condition evaluate to true. The TextField is empty. This only happens when
I click on the submit component and when using Tapestry 4. If I remove the @If
component, everything works fine.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: bug in 4.0 ????
Posted by Kent Tong <ke...@cpttm.org.mo>.
Otto <Otto.Gonzalez <at> Gwinnettcounty.com> writes:
> In this scenario where lastName is of type TextField, the FieldLabel component
> shows the displayName defined in the TextField component. But the TextField
> does not show my data.
>
> <td class="label"><span jwcid=" <at> FieldLabel" field="component:lastName">
> Last
> Name</span></td>
> <span jwcid=" <at> If" condition="ognl:editing">
> <td class="input"><input jwcid="lastName" size="50" maxlength="100"/></td>
> </span>
> </tr>
What does it show then?
> If I remove the If components, The TextField shows data correctly.
Maybe the condition is false so it is not rendered?
--
Author of a book for learning Tapestry (http://www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org