When you use a <p:menuitem/> and/or <p:submenu> merged with other tags you get this error:
java.lang.ClassCastException: com.sun.faces.facelets.compiler.UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement
One of the ideias to solve this problem is add this to your web.xml:
Code: Select all
<context-param>
<param-name>facelets.SKIP_COMMENTS</param-name>
<param-value>true</param-value>
</context-param>
Code: Select all
<sec:authorize ifAnyGranted="role">
<p:submenu label="menu1">
<sec:authorize ifAllGranted="sub_role">
<p:menuitem value="#{menu2}"/>
</sec:authorize>
.
.
There is an open issue here explaining the problem: https://code.google.com/p/primefaces/is ... %20Summary
but is has no answer.
So, any ideias of what i can do to solve this problem?