This is really a USER list question, but you may be looking for the indexed properties how-to:

http://jakarta.apache.org/struts/faqs/indexedprops.html

Graham Leggett wrote:

Hi all,

I am having some conceptual problems with the "indexed" property of the HTML tags, I have tried to find docs on this property, but apart from a brief one line description I can find none.

I have some JSP that looks roughly like this:

<logic:iterate [length of (String[])policycoverId] />

<html:select indexed="true" property="policycoverId">
<html:optionsCollection property="policycovers" label="name" value="value" />
</html:select>


</logic:iterate>

The form property "policycovers" contains the list of options in the dropdown, and this works fine.

The form property "policycoverId" is a String[], containing the default value for the dropdown in each iteration.

The option indexed="true" means output variables with a sequence embedded in them - but - the default value of policycoverId is always interpreted to mean the last value of the array, and not each iteration in the array, as is the logical behaviour.

Is this a bug with the indexed="true" attribute? Am I reading the docs wrong? What is the "right" way to do this?

Regards,
Graham
--


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



-- Ted Husted, Junit in Action - <http://www.manning.com/massol/>, Struts in Action - <http://husted.com/struts/book.html>, JSP Site Design - <http://www.amazon.com/exec/obidos/ISBN=1861005512>.

"Get Ready, We're Moving Out!!" - <http://www.clark04.com>



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



Reply via email to