File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Author

Need help for h:selectManyCheckbox

Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 157
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}" />

</h:selectManyCheckbox>


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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Need help for h:selectManyCheckbox
 
Similar Threads
Applying style class to only one item in h:selectmanyCheckbox
selectManyCheckbox in dataTable returns only the last selected item rather the whole list.
how to set checked to checkbox and radio button
SelectManyCheckBox -- Help Needed
ajax4jsf: how to get selected value(s) from component with f:selectItems