The whole syntax is as below
<h:commandLink action="CustomerDetails?faces-redirect=true&customerId=#{item.id}" value="#{item.name}"/>
This is inside a dataTable, hence 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>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With