I was just reviewing the indexed tags funtionality and it looks like a
valuable addittion.

Before I rebuilt struts however, I had a question regarding the funtionality
with ArrayLists and Vectors.

Essentially, I was wondering if you could use these tags on objects like
Vectors and lists given that you implement the getter funtion using an
indexed parameter.

Using the example from http://husted.com/about/struts/indexed-tags.htm :

        <logic:iterate id="parameter" name="ParametersForm"
                        property="parameterList">
                ...
                <html:text name="parameter" property="value" indexed="true"/>
                ...
        </logic:iterate>

then in the action class, could you have?

        // an ArrayList of some "parameter" bean that has a "value" property.
        private ArrayList parameterList;

        public ArrayList getParameterList()
        {
                return this.parameterList;
        }

        public parameter getParameter(int index)
        {
                return this.parameterList.get(index)
        }

Thanks

D



Reply via email to