user3402111
user3402111

Reputation: 11

JSF f:selectItems value partially bold

This is my checkboxes:

<h:selectManyCheckbox style="font-size: 8pt; text-align: left" id="inputGroupIDBoxes" layout="pageDirection" value="#{pc_DesignersInterface.selectedInputGroupIDs}" rendered="#{pc_DesignersInterface.showInputGroup}">                 
    <f:selectItems value="#{pc_DesignersInterface.inputGroupIDs}" />                
</h:selectManyCheckbox>

and this is my backbean:

inputGroupIDs.add(new SelectItem(st.nextToken().trim(),"<b>--</b>" + GrpFieldIds.get(g).trim()));

but I don't get bold -- in the check box. What am i doing wrong? Thanks.

Upvotes: 1

Views: 1041

Answers (1)

Daniel
Daniel

Reputation: 37061

You can set the escape of the SelectItem from its constructor:

new SelectItem(st.nextToken().trim(),"<b>--</b>" + GrpFieldIds.get(g).trim(), 
    null, false, true)

here its signature new SelectItem(value, label, description, disabled, escape)

Upvotes: 1

Related Questions