Reputation: 138
I am trying put method and String in a action property of a menuitem (primefaces).
Code:
<p:submenu label="Permissao" icon="ui-icon-note">
<p:menuitem value="Editar" action="#{principalTemplateBean.sistemaPath}/permissao/editar" ajax="false"/>
</p:submenu>
But when I run I got this:
Caused by: javax.el.ELException: Not a Valid Method Expression: #{principalTemplateBean.sistemaPath}/permissao/editar
at com.sun.el.lang.ExpressionBuilder.createMethodExpression(ExpressionBuilder.java:311)
at com.sun.el.ExpressionFactoryImpl.createMethodExpression(ExpressionFactoryImpl.java:96)
at org.jboss.weld.util.el.ForwardingExpressionFactory.createMethodExpression(ForwardingExpressionFactory.java:43)
at org.jboss.weld.el.WeldExpressionFactory.createMethodExpression(WeldExpressionFactory.java:53)
at org.jboss.weld.util.el.ForwardingExpressionFactory.createMethodExpression(ForwardingExpressionFactory.java:43)
at org.jboss.weld.el.WeldExpressionFactory.createMethodExpression(WeldExpressionFactory.java:53)
at com.sun.faces.facelets.tag.TagAttributeImpl.getMethodExpression(TagAttributeImpl.java:240)
Upvotes: 1
Views: 1280
Reputation: 20043
The action attribute is for calling a method in the backing bean, not for navigation. Use outcome or url for that, depending on whether you call an external URL.
You can find more information on this here: link from <p:menuitem> to certain <p:tab>
Upvotes: 1