Hey Denis,

I'm not sure if I got you right, but you surely can access a nested bean in
a form.

i.e.:
<html:text name="aForm" property="aBean.aData" />

...is that understandable?

(Do you have a "nested" taglib?)

Regards,
Bernhard

-----Ursprüngliche Nachricht-----
Von: Denis Wang [mailto:dwang@;brandmuscle.com]
Gesendet: Dienstag, 12. November 2002 14:20
An: struts
Betreff: how to populate nested bean in actionform


Hello,
Suppose I have ActionForm aForm, which has a private field aBean.  aBean is
a dumb data hold class with a field aData.  I can populate the aData from my
backend data resources and write it to JSP as the following:
<nested:form action='the action related the aForm'>
<nested:nest property='aBean'>
<nested:write property='aData'>
...

My problem is how to read the aData from JSP and write it to my backend data
resources.  I tried:
<nested:form action='the action related the aForm'>
<nested:nest property='aBean'>
<nested:text property='aData'>
...

The server will throw NullPointerException.  I am afraid the struts don't
know how to initiate aBean before setProperty("aData").

Any help will be highly appreciated!
Denis


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

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

Reply via email to