When I use #{s:hasRole('test')} in a facelet view it works. However, when I try to use facesContext.getApplication().createValueBinding("#{s:hasRole('test')}"); I get the following error:
... Caused by: javax.faces.el.ReferenceSyntaxException: Functions not supported in expressions. Function: s:hasRole at org.apache.myfaces.el.ValueBindingImpl$1.resolveFunction(ValueBindingImpl.java:74) at org.apache.commons.el.FunctionInvocation.evaluate(FunctionInvocation.java:148) at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:386) ... 62 more