I have a page that the user can access via Android, iPhone, BlackBerry or via an unknown browser. I have 4 rich:panel
s, one for each platform and the latter is a generic one.
The code:
<rich:panel id="dlAndroid" rendered="#{fn:containsIgnoreCase(request.getHeader('User-Agent'), 'Android')}">
...
</rich:panel>
<rich:panel id="dlIphone" rendered="#{fn:containsIgnoreCase(request.getHeader('User-Agent'), 'iPhone')}">
...
</rich:panel>
<rich:panel id="dlBlackberry" rendered="#{fn:containsIgnoreCase(request.getHeader('User-Agent'), 'BlackBerry')}">
...
</rich:panel>
<rich:panel id="dlGeneric" rendered="#{ ---> WHAT TO WRITE HERE? <--- }">
How can I render the last rich:panel
only if none of the others has been rendered?
rendered="#{not(fn:containsIgnoreCase(request.getHeader('User-Agent'), 'Android') or fn:containsIgnoreCase(request.getHeader('User-Agent'), 'iPhone') or fn:containsIgnoreCase(request.getHeader('User-Agent'), 'BlackBerry'))}"
? – Luiggi Mendoza