The whole syntax is as below
<h:commandLink action="CustomerDetails?faces-redirect=true&customerId=#{item.id}" value="#{item.name}"/>
This is inside a dataTable, henc开发者_开发问答e explain the use if item
. But the above code give me
Not a Valid Method Expression: CustomerDetails?faces-redirect=true&customerId=#{item.id}
It seems to not allow me to concatenate string and EL expression. Done that many inside value
attribute, must be something with the action
attribute. Any one got a solution for this?
Try using an f:param in an h:link to set the customerId, which is the canonical way of setting query parameters. So:
<h:link outcome="CustomerDetails" value="#{item.name}">
<f:param name="customerId" value="#{item.id}" />
</h:link>
精彩评论