File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSF and the fly likes Need help for h:selectManyCheckbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "Need help for h:selectManyCheckbox" Watch "Need help for h:selectManyCheckbox" New topic

Need help for h:selectManyCheckbox

Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 160
Hi All,

In my application I need to show dynamic services and this dynamic services should also show default services in the list.

So user will see some of the selected checkbox which will indicates that these are default services which he will get and rest of the services will be with unchecked checkbox.
So Iam using <h:selectManyCheckbox > for this and I am using two list to achieve this the code is given below.

A) value="#{cartBean.highendSelectedArrList} this is a default service_id list which will show the checkbox selected as checked
whereas <f:selectItems value="#{cartBean.highendservices}" /> highendservices is a list which has list of all the service lis.

<h:selectManyCheckbox id="highend" value="#{cartBean.highendSelectedArrList}" border="1" layout="lineDirection">
<f:selectItems value="#{cartBean.highendservices}" />


My question is that can you suggest the way so that I dont need to make two list rather one list I can show the use default services for him as well as rest of the services then user make selection and can retrieve the values easily.

Thanks in advance

jasmine kaur
I agree. Here's the link:
subject: Need help for h:selectManyCheckbox
jQuery in Action, 3rd edition