Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Need help for h:selectManyCheckbox  RSS feed

Jasmine kaur
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!