Mike,

To capture that data, I think your form bean needs nested objects.  When
populated, your ActionForm (if you use one) will try to invoke
getFoo().getStatus().setName(value) where value is what was submitted. So,
to capture it, you either need to have your Actionform have a Foo object
plus getter, which contains a Status object plus getter, which also
containers a Name object plus getter to assign the value (Don't you hate
nesting this deep?)
OR
Simply call, from within your action, a
request.getParameter("foo.status.name") and assign the returned value to the
object of your choice.

Regards,
David

-----Original Message-----
From: Mike Darretta [mailto:[EMAIL PROTECTED]
Sent: Tuesday, October 26, 2004 2:03 PM
To: Struts Users Mailing List
Subject: Drop Lists in a Table


This is my first cut at Struts, so hopefully my post makes sense...

I have rendered a table that contains 3 r/o columns and one editable
droplist column. I am able to render all data into the four columns,
including the droplist options and the current selection. My problem is
that I am unable to capture the modifcations to the droplist.

How are these droplist "events" captured? Below is the jsp codelet to
render the droplist and data:

          <td><center><html:select name="beans" property="foo.status.name">
                <bean:define id="fooStatusListBean" name="fooStatusForm"
                           property="fooStatusList"
type="java.util.ArrayList"/>
                <html:options collection="fooStatusListBean" property="name"
                           labelProperty="description"/>
              </html:select></center></td>

My ActionForm has a "beans" Collection attribute that is used to
populate the table rows. I have not figured a way to capture droplist
modifications to the "foo.status.name" attribute for each individual bean.

Any help is appreciated. Thanks!

Mike


---------------------------------------------------------------------
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