You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ciaran Hanley <ci...@sentenial.ie> on 2003/12/24 13:10:45 UTC

problem

I want to use an update user details page in my application which uses a
form to display the current user details and updates any changes. Im
having problems displaying the information of the user bean in the value
property.
 
What I want is 
<html:text property="name" value="current users name" />
 
Ive tried the following which is giving me errors:
<html:text property="name" value="<bean:write name="currentUser"
property="name" />" />
 
Anybody know how to do this?
Thanks

Re: problem

Posted by Mark Lowe <ma...@talk21.com>.
<html:text property="name" value="<%= user.getName() %>" />

or

<html-el:text property="name" value="${user.name}" />


You can also  populate in the refering action (assuming you've one), i 
think this is better and keeps your form cleaner and thus perhaps more 
reusable.

theForm.setName("Brian");

or dynaactionform

theForm.set("name","Brian");

<html:text property="name" />

will render to

<input type="text" name="name" value="Brian">

Cheers Mark


On 24 Dec 2003, at 12:10, Ciaran Hanley wrote:

> I want to use an update user details page in my application which uses 
> a
> form to display the current user details and updates any changes. Im
> having problems displaying the information of the user bean in the 
> value
> property.
>
> What I want is
> <html:text property="name" value="current users name" />
>
> Ive tried the following which is giving me errors:
> <html:text property="name" value="<bean:write name="currentUser"
> property="name" />" />
>
> Anybody know how to do this?
> Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org