GeeCON Prague 2014*
The moose likes JSF and the fly likes JSF multiple check box and single array list in backing bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "JSF multiple check box and single array list in backing bean" Watch "JSF multiple check box and single array list in backing bean" New topic
Author

JSF multiple check box and single array list in backing bean

sheela nithy
Greenhorn

Joined: Jun 09, 2011
Posts: 2
Hi everyone,

I am new to JSF and this forum.. Please help me to find a solution for my requirement below..

I have requirement that, I have three panels, and each panel has a set of checkoxes.. User can select or deselect any checkbox according to their wish..

But all the values are retrieved from a single table where the label / description of the check box is saved when the user selects any checkbox.. (There is a unique ID to make it specific to each customer and this is not a problem now..)

Could someone help me how to accomplish this is backing bean and in JSF (because according to my understanding, when datatable is used we can only display each chkbox in row.. But I want 3 check box in a row and also they are distributed across 3 panels.. Means three panels each having some checkboxes 3 in a row..)

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16101
    
  21

You can embed a panelGrid in the dataTable like so:


That will give you a horizontal layout.


Customer surveys are for companies who didn't pay proper attention to begin with.
sheela nithy
Greenhorn

Joined: Jun 09, 2011
Posts: 2
Thanks for the reply..

Could you please post the code along with the datatable..

I am totally confused with JSF..
 
GeeCON Prague 2014
 
subject: JSF multiple check box and single array list in backing bean