开发者

what wrong with <h:commandButton value="...?userId=#{...}"

The whole syntax is as below

<h:commandLink action="CustomerDetails?faces-redirect=true&amp;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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜