icefaces visible to CSS style attribute

UI Components for JSF
Post Reply
allplan
Posts: 29
Joined: 15 Apr 2016, 13:39

18 May 2016, 10:49

Because, Primefaces does not have a visible attribute as Icefaces has. So, I migrated the visible="false" to style="display: none" and visible="true" to style="display: inline" as a Primefaces attribute. However, I have to migrate also visible="#{graphicDataController.drawingItems.size() > 0 }" or something like this visible="#{workbasketBean.isCurrenTaskAvailable() or workbasketBean.currentProcessAvailable() }" I want to use something like this style="display: #{bean.prop ? 'inline' : 'none'}" but I do not know how to evaluate this complex expression workbasketBean.isCurrenTaskAvailable() or workbasketBean.currentProcessAvailable() in CSS.

Thanks in advance. Can you advise me, please?

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

18 May 2016, 11:50

What about

Code: Select all

style="display: #{workbasketBean.isCurrenTaskAvailable() ? 'inline' : 'none'}" 
?

And use code tags the next time ;)
Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 41 guests