No. Your problem is 'value=""'. This will set the value to empty string no
matter what the bean's value was. It overrides it, in other words.
If you want the value pulled from the form bean passed in, remove the value
attribute and it should work.
- eric
----- Original Message -----
From: "Mikkel Bruun" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 11:16 AM
Subject: RE: Populating HTML text field value property with a Bean property.
> Hi Mohan,
>
> Well you almost got it...
>
> Consider this example,
>
> <html:text name="emp" property="emp_id" size="10" value=""
maxlength="10"/>
>
> It will populate the text field with the emp_id property from the bean
> called emp. Basically emp.getEmp_id()
> Emp can be a bean in any scope, eg page, application, session or
request...
>
> hope this helps??
>
> Mikkel Bruun
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Sent: 16-05-2001 16:38
> Subject: Populating HTML text field value property with a Bean property.
>
> Hi,
> I am a new Struts user and am not sure as to how to populate a struts
> HTML
> text field's value property with the property of a bean without
> manipulating it in ActionForm.
> For example i need to initialize the value with a bean's property.
>
> <html:text property="emp_id" size="10" value="" maxlength="10"/>
>
> Thanks in advance.
>
> Mohan Venkataraman.
>