You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Laurent Duperval <ld...@yahoo.com> on 2004/10/07 20:21:56 UTC
Periods in form attribute names prevents retrieval
Hello,
I have an opbject that looks like this:
Profile {
String name;
Account account;
String getName();
Account getAccount();
}
Account {
String name;
String getName();
}
In my jsp, I have code like this:
...
...
...
<html:text name="profile" property="account.name" value="Foo" />
...
...
...
This generates:
<td><input type="text" name="profile.name" value="Foo"></td>
I'm using DynaValidatorActionForm's to validate the data. Whenever I use my
page, I get an error saying that the account name property isn't set. I am
positive it's because of the period (.) in the name of the attribute. Is
there a way for me to get around this problem?
Thanks,
L
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Periods in form attribute names prevents retrieval
Posted by Laurent Duperval <ld...@yahoo.com>.
Jeff Beal wrote:
> Have you tried
> <html:text name="profile.account" property="name"/>?
>
Ahaaa! No I haven't. Thanks!
L
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Periods in form attribute names prevents retrieval
Posted by Jeff Beal <jb...@webmedx.com>.
Have you tried
<html:text name="profile.account" property="name"/>?
-- Jeff
Laurent Duperval wrote:
> Hello,
>
> In my jsp, I have code like this:
>
> ...
> ...
> ...
> <html:text name="profile" property="account.name" value="Foo" />
> ...
> ...
> ...
>
> This generates:
>
> <td><input type="text" name="profile.name" value="Foo"></td>
>