wood burning stoves 2.0*
The moose likes JSF and the fly likes create multiple checkboxes with Data base values in jsf page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "create multiple checkboxes with Data base values in jsf page " Watch "create multiple checkboxes with Data base values in jsf page " New topic
Author

create multiple checkboxes with Data base values in jsf page

Numay Hammad
Greenhorn

Joined: Jan 01, 2012
Posts: 4

hello

i am new to JSF and i am trying to create multiple chexkboxes inside my jsf page , and populate it with values comes from a list or data base ( do not know how many values)

so i populated a list ( bookList ) in my managed bean with database values

but i do not know how to display checkboxes using my ( booList ) values

i wrote exactly the same thing in jsp page and it was like this



and now i have the same array or list in my managed bean class

how can i do the same thing in my new JSF page

what should i write in these tags :



thanks in advance of your help

and if any one can suggests a good reference(s) to learn JSF i will be thankful

thaank you



Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15950
    
  19

Well, this is where you have to RTFM. http://docs.oracle.com/javaee/5/javaserverfaces/1.2/docs/tlddocs/h/selectManyCheckbox.html

Ewww. They certainly got Always the Low Price[TM] on the javadocs for that tag.

Here's a handy guide: http://exadel.com/web/portal/jsftags-guide

The actual backing property for the "f:selectItems" tag is an array or List of SelectItem objects.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: create multiple checkboxes with Data base values in jsf page
 
Similar Threads
how to set checked to checkbox and radio button
create multiple Checkboxes with data base values in jsp
can't get values from h:selectManyCheckbox
Applying style class to only one item in h:selectmanyCheckbox
Initializing request scoped managed bean instance