> -----Original Message-----
> From: Karr, David [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 14, 2002 12:30 PM
> To: '[EMAIL PROTECTED]'
> Subject: Details of Action, ActionForm, and JSP page using 
> logic:iterate
> a nd html:multibox?
> 
> 
> I could use a concise description of the alternatives and 
> details of setting
> up my Actions, ActionForm, and JSP pages so I can have a logic:iterate
> wrapping a set of html:multibox elements, and so the set 
> options can be
> communicated back and forth effectively.  I could also use 
> any pointers to
> documentation or articles that describe these details.  I've 
> gone through
> the basic Struts documentation and done searches in the struts-user
> archives.  I've got something working, but I'm unsure of 
> whether there are
> better choices.  The only examples I've found are very 
> simplistic and not
> very realistic.  If you know of examples that cover these 
> details (and not
> too many others), I would appreciate it.
> 
> I'm currently using 1.1-b2, so information about the latest 
> conventions
> would be fine.
> 
> So far, I have something working, using a Collection attribute called
> "optionChoices", containing LabelValueBean objects, and a 
> String[] attribute
> called "selectedOptions".  My "setup" action creates the 
> "optionChoices"
> list, and my "submit" action can read the "selectedOptions" 
> list.  If the
> original options page is redisplayed, the previously selected 
> options are
> checked, and no others.  This seems to be correct, but again, I'm not
> certain whether there are better ways to do this.

This is effectively the same as what I do. I assume you're using the 'value'
in LabelValueBean as the value to be submitted, and the 'label' as a string
that sits beside the checkbox? The elements of my collections are typically
more complex than LabelValueBean, because I'm building multi-column tables,
but in essence, it's the same thing.

--
Martin Cooper


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



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

Reply via email to