• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

create multiple checkboxes with Data base values in jsf page

 
Greenhorn
Posts: 4
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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



 
Saloon Keeper
Posts: 27807
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

 
And then we all jump out and yell "surprise! we got you this tiny ad!"
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic