掲示板

h:link takes wrong parameter

11年前 に Eduard Korenschi によって更新されました。

h:link takes wrong parameter

New Member 投稿: 10 参加年月日: 10/02/24 最新の投稿
Hi there.

I'm using Liferay 6.1.1 with Liferay Faces bridge and Primefaces 3.4 and i noticed the following unpleasent issue:

<p:datatable value="xxxx" var="x">
<p:column>
<h:link outcome="entity-details?faces-redirect=true" value="#{x.description}">
    <f:param name="id" value="#{x.id}" />
</h:link>

</p:column></p:datatable>

<h:link outcome="entity-details?faces-redirect=true" value="Add" />


Now, of course, what i expect is that when i click on the link of some X, i get sent to entity-details.jsf?id=x.id, which works just fine. My problem is that I also expect that when i click on "Add", i get sent to entity-details.jsf, but instead i get sent to entity-details.jsf?id=last-used-id, where last-used-id is the last id used in the dataTable, although as you can see, the "Add" h:link has no f:param whatsoever.

Eduard Korenschi
thumbnail
11年前 に Neil Griffin によって更新されました。

RE: h:link takes wrong parameter

Liferay Legend 投稿: 2655 参加年月日: 05/07/27 最新の投稿
Maybe try something like this?

<h:link outcome="entity-details?faces-redirect=true" value="Add">
    <f:param name="id" value="" />
</h:link>