if you *really* want to do it this way, you need to have an embedded
scriptlet:
<html:select property="nestedClass.nestedBeans[<%
request.getParameter("index") %>].value" size="1">
or something like that
better is to refer to a unique property of the action form which is the
selected item, and a collection that houses a copy of the list of objects
that possess the property like this:
<html:select name="nestedClass" property="nestedBeanValue">
<html:options collection="nestedBeans" property="value"
labelProperty="label"/>
</html:select>
if you're wedded to index, make it a property of your objects in the list
-JT
-----Original Message-----
From: Matt Sales [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 10:27 AM
To: Struts Users Mailing List
Subject: problem getting indexed property values
Hello,
I'm having a hard time getting the value of an indexed property to my Action
classes.
Essentially, on my JSP I've got
<html:select property="nestedClass.nestedBeans[x].value" size="1">
<html:options ... />
</html:select>
where nestedClass is (of course) a nested class within my ActionForm class,
and nestedBeans is an array of beans with an attribute "value."
What's perplexing to me is that the correct values are coming up in my JSP
page (so my syntax must be correct). After I submit the form, though, every
bean in nestedBeans is reset to 'null'. I have a custom reset function in
the ActionForm, and it does not reset nestedClass or any of it's values.
Has anyone run into similar problems?
I can include code if it would help.
Thanks in advance,
Matt
--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>