You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Lalchandra Rampersaud <lr...@ceis.cujae.edu.cu> on 2008/11/15 21:29:04 UTC

[S1] how to get a scrollable checkbox list

hello all,
i was wondering if it is possible at all to get checkboxes into a select in struts...
any help would be appreciated.

here is a sample code that i used although it did not work the way i wanted it to.  the checkboxes are being placed outside of the select component.

<html:select multiple="true" property="compatibles" size="5" style="width: 280px">
     <html:option value="009"> <html:checkbox property="xxx">dada</html:checkbox> </html:option>
    <html:option value="007"> <html:checkbox property="xxx">dada</html:checkbox> </html:option>
    <html:option value="005"> <html:checkbox property="xxx">dada</html:checkbox> </html:option>
</html:select>

best regards
ravi

[OT] Re: [S1] how to get a scrollable checkbox list

Posted by Dave Newton <ne...@yahoo.com>.
AFAIK there's no way to get complicated HTML into a standard HTML select box; this doesn't have anything to do with Struts though.

You can (somewhat, anyway?) duplicate the effect with a scrollable DIV, although you'd have to handle most of the normal select semantics yourself. I'd be more likely to recommend any of several client-side JavaScript libraries that have already done the bulk of the work for you.

Dave

--- On Sat, 11/15/08, Lalchandra Rampersaud wrote:
> i was wondering if it is possible at all to get checkboxes
> into a select in struts...
> any help would be appreciated.
> 
> here is a sample code that i used although it did not work
> the way i wanted it to.  the checkboxes are being placed
> outside of the select component.
> 
> <html:select multiple="true"
> property="compatibles" size="5"
> style="width: 280px">
>      <html:option value="009">
> <html:checkbox
> property="xxx">dada</html:checkbox>
> </html:option>
>     <html:option value="007">
> <html:checkbox
> property="xxx">dada</html:checkbox>
> </html:option>
>     <html:option value="005">
> <html:checkbox
> property="xxx">dada</html:checkbox>
> </html:option>
> </html:select>
> 
> best regards
> ravi

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org