This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help for h:selectManyCheckbox

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
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic