Re: pretty:link and query parameter

Splash Forums PrettyFaces Users pretty:link and query parameter Re: pretty:link and query parameter

#20642

Yes, PrettyFaces links work from inside a datatable without problems. Just add the query parameters to your mapping like this:

<url-mapping id="po_payment_confirmation">
<pattern value="/payment_confirmation" />
<query-param name="po_header_id">#{personalPoBean.po_header_id}</query-param>
<query-param name="payment_method">#{personalPoBean.payment_method}</query-param>
<view-id>/pages/personal/po_payment_confirmation.jsf</view-id>
</url-mapping>

See this chapter of the PrettyFaces documentation.

Then you can create links for this mapping like this:

<pretty:link mappingId="po_payment_confirmation">
<f:param name="po_header_id" value="#{currentItem.id}" />
<f:param name="payment_method" value="somePaymentMethod" />
Click here
</pretty:link>

See the chapter on pretty:link for details.