struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lawrence Williams" <>
Subject N by N multiboxes !!!
Date Wed, 18 Feb 2004 18:56:08 GMT

I am trying to generate a form allowing attributes in a catalog to be set on
or off for particular products.

So depending on the state of the Database there will be N Attributes each
with M slectable values (as attributes are added and new styles become
available N and M will vary:


Color (red,blue.. N .., green)
Size	(s,m,l,xl)
Weight (1,2,3)

I want a jsp form to display all options for all defined attributes. I
currently have a form:

            <form-property name="attributeNames" type="java.lang.String[]"/>
            <form-property name="attributeValues"

Where each attributeValues object array entry has in it a LabelValueBean[]
array storing the values for each attribute.

At present ive got the form of checkboxes rendering using standard html
<input type=checkbox... Tags.

<c:forEach items="${modifyAttributesForm.attributeNames}" var="heading"
<c:forEach items="${modifyAttributesForm.attributeValues[i.index]}"
var="valuePairs" varStatus="j">
	<INPUT name="${heading}" type="checkbox"


I of course now want to use the struts multibox tag to handle all the
repopulation for me. However, it seems to me the multibox control is only
going to work for a single String[] array of populated values, I need a 2
dimensional structure. 

I cant see how I can do this - perhaps I have hit a common pattern here - ?
Any Ideas?


Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (
Version: 6.0.590 / Virus Database: 373 - Release Date: 16/02/2004

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message