0

I am new to primefaces and JSF. I want to make selectBooleanCheckbox visible by depending on some Boolean value in my bean. But there is no visibility feature. And if I add a panel the design changes. So do you have any suggestions?

  <p:selectBooleanCheckbox id="idCheckbox" value="#{bean.object.value}" itemLabel="{bean.object.value.label}" styleClass="width100Percent" disabled="{bean.infomode}">
Kukeltje
  • 12,223
  • 4
  • 24
  • 47
ekcb9
  • 13
  • 5

1 Answers1

0

You can add "rendered" attribute to control whether the component is displayed.

<p:selectBooleanCheckbox id="idCheckbox" 
                         value="#{bean.object.value}" 
                         itemLabel="#{bean.object.value.label}" 
                         styleClass="width100Percent" 
                         disabled="#{bean.infomode}"
                         rendered="#{bean.showIt}"
>
lumion
  • 25
  • 5
  • Like the duplicate states, No need to answer question that have perfectly matching duplicates. Better to hintbat the poster that indeed the duplicate comtains the answer – Kukeltje Aug 12 '20 at 06:01