Mahmoud Saleh
Mahmoud Saleh

Reputation: 33605

How to give the h:selectManyCheckbox a fixed name attribute?

I have a <h:selectManyCheckbox> and they have in the HTML source an autogenerated name attribute. I need to give it a fixed name attribute. How can I do that?

Here's what I am using for now:

<h:selectManyCheckbox value="#{tab.values}" layout="pageDirection">
    <f:selectItems value="#{tab.checkBoxes}" />
</h:selectManyCheckbox>

Upvotes: 0

Views: 269

Answers (1)

Daniel
Daniel

Reputation: 37051

Specify the id attribute:

<h:selectManyCheckbox id="someName" value="#{tab.values}" layout="pageDirection">

Also look here :

JSF HTML Tag Referenceh:selectManyCheckbox

Upvotes: 2

Related Questions