Nadia K.,

If "myBeanName" is the ActionForm associated with your Action, just use:

<html:text property="id" />

If "myBeanName" is a bean you manually saved in the session or request and
isn't listed as the form for your action (using the name="" attribute in the
action mapping), then you can try:

<html:text name="myBeanName" property="id" />

For more details, see the documentation:
http://struts.apache.org/userGuide/struts-html.html

Regards,
David

-----Original Message-----
From: Nadia Kunkov [mailto:[EMAIL PROTECTED]
Sent: Wednesday, September 29, 2004 3:03 PM
To: Struts help (E-mail)
Subject: <bean:write> within <html:text>, how to use?


Hi, newbie question again.
I'm trying to use <bean:write> within <html:text> tag.

Here is how I use it with just plain HTML and it works:
<input type=text name="somename" value= ' <bean:write name="myBeanName"
property="id"/> ' >
or
<input type=hidden name="somename" value= ' <bean:write name="myBeanName"
property="id"/> '
myBeanName is a bean that was put in a session with the data from the
database.

Instead of the <input type=text ...> etc.  I'd like to use <html:text....>
or <html:hidden....>
I tried <html:text name="somename" value= ' <bean:write name="myBeanName"
property="id"/> ' /> but that's not right.  Could you help me with this?

Also, is having the bean in a session or request with data from the database
and then using bean:write, only way of displaying the data on a page?  There
is BeanUtils method to populate DTO with the data from an action form, can I
somehow populate an action form from a bean instead of using bean:write in
my jsp?

Thanks for your help
NK



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to