If all the options are going to have the same name, then this should
work
logic:iterate id=anOption name=myFormBean property=options
html:text name=anOption property=options size=2/
/logic:iterate
Since each element is a String, the tag will just that instead of making
a property call.
I
There is an example of this in the Validator example
webapp in the type.jsp page in the nightly builds
using an ArrayList, but I believe everything should
work for an array too (or you could use
java.util.Arrays to convert to a Collection if you
need to).
web/validator/WEB-INF/validation.xml
-Original Message-
From: Kashambuzi, Michael (C)
Sent: Tuesday, June 04, 2002 9:41 AM
To: 'Struts Users Mailing List'
Subject: Indexed Property Validation on a String[]
Hi:
I have a form bean that contains an attribute defined as a String[].
public
3 matches
Mail list logo