Study the tutorials at www.keyboardmonkey.com for using the <nested> Struts
tags.
--- Lawrence Williams <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> 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:
>
> E.g.
>
> Color (red,blue.. N .., green)
> Size (s,m,l,xl)
> .
> .
> N
> .
> .
> Weight (1,2,3)
>
>
> I want a jsp form to display all options for all defined attributes. I
> currently have a form:
>
> <form-bean
> name="modifyAttributesForm"
> type="myproj.product.AttributeForm">
> <form-property name="attributeNames"
> type="java.lang.String[]"/>
> <form-property name="attributeValues"
> type="java.lang.Object[]"/>
> </form-bean>
>
> 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"
> varStatus="i">
> <c:forEach items="${modifyAttributesForm.attributeValues[i.index]}"
> var="valuePairs" varStatus="j">
> <INPUT name="${heading}" type="checkbox"
> value="${valuePairs.value}">${valuePairs.label}<br>
>
> </c:forEach>
> </c:forEach>
>
> 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?
>
> Lawrence
>
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.590 / Virus Database: 373 - Release Date: 16/02/2004
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
__________________________________
Do you Yahoo!?
Yahoo! Mail SpamGuard - Read only the mail you want.
http://antispam.yahoo.com/tools
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]