Page 1 of 1

<pa:menu> and <sec:authorize> problem

Posted: 29 Jun 2017, 15:31
by ntapan
Hi,

I want to use <sec:authorize access> in topbar.xhtml,
but it gets exception like below.
When I delete <sec:authorize> part, it works !!
I was using spark, <ps:menu> and it was working well.


Exception:
java.lang.ClassCastException: com.sun.faces.facelets.compiler.UIInstructions cannot be cast to org.primefaces.model.menu.MenuElement
at org.primefaces.apollo.component.menu.ApolloMenuRenderer.encodeElements(ApolloMenuRenderer.java:51)
at org.primefaces.apollo.component.menu.ApolloMenuRenderer.encodeMarkup(ApolloMenuRenderer.java:41)
at org.primefaces.component.menu.BaseMenuRenderer.encodeEnd(BaseMenuRenderer.java:114)

Re: <pa:menu> and <sec:authorize> problem

Posted: 03 Jul 2017, 11:55
by aragorn
I'll check and get back to you. Also, which Apollo and PrimeFaces version are you using?

Re: <pa:menu> and <sec:authorize> problem

Posted: 07 Jul 2017, 14:23
by ntapan
Hi,

The problem was about "<param-name>javax.faces.FACELETS_LIBRARIES</param-name>" definition in web.xml.
It was like this:
<param-value>/WEB-INF/springsecurity.taglib.xml
/WEB-INF/primefaces-apollo.taglib.xml
</param-value>

I have changed it:
<param-value>/WEB-INF/springsecurity.taglib.xml;/WEB-INF/primefaces-apollo.taglib.xml
</param-value>

Now, it works well.
Thanks for your reply, sorry to bother you :((

Re: <pa:menu> and <sec:authorize> problem

Posted: 07 Jul 2017, 15:29
by aragorn
Glad to hear, thanks a lot for the update :)