during our migration from richfaces to primefaces, i stumbled across the richfaces tag a4j:actionparam (demo), e.g.:
<p:menuitem value="#{msg['label.showTrackAndTrace']}"
...
actionListener="#{listTRQDataModel.fetchCurrentRow}">
<a4j:actionparam name="row" value="{currentRowNo}" />
<a4j:actionparam name="actionName" value="viewTNTListTrips" />
</p:menuitem>
luckily, since it doesn't use the assignTo attribute, the conversion of this tag to primefaces is pretty simple:
<p:menuitem value="#{msg['label.showTrackAndTrace']}"
...
actionListener="#{listTRQDataModel.fetchCurrentRow}">
<f:param name="row" value="{currentRowNo}" />
<f:param name="actionName" value="viewTNTListTrips" />
</p:menuitem>
NOTE: f:param would have worked just as fine in richfaces, but for some reason, whoever coded the old version used a4j:actionparam instead (overkill and unnecessary).
see also the great f:param tutorial by mkyong.
IT, computer and programming tutorials and tips that i couldnt find anywhere else using google, from my daily work as a Senior Developer of solutions using Java and Linux.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment