java - JSF Richfaces Render condition for one part of Label -


i using 3 different strings backing bean build label rich:simpletogglepanel.

<rich:simpletogglepanel id="loadpanel" switchtype="client" label="#{backingbean.name1} - #{backingbean.name2} - #{backingbean.name3}" > 

i want name3 appear in specific conditions. possible give condition name3?

you can using el conditional operator:

label="#{backingbean.name1} - #{backingbean.name2} - #{conditions ? backingbean.name3 : ''}" 

so when conditions evaluate true backingbean.name3 printed otherwise empty string added label, backingbean.name3 omitted when conditions evaluate false.


Comments

Popular posts from this blog

design - Custom Styling Qt Quick Controls -

Unable to remove the www from url on https using .htaccess -