Hi everybody

On a page which lists books I provide an "edit" Button where users can change informations on books:

-----
PAGE:
-----

<t:column ...

<t:commandLink id="EditBook" action="editor"
actionListener="#{referenceBean.selectReference}">
<t:outputText value="Edit" />
<f:param id="editId" name="id" value="#{reference.id}" />
</t:commandLink>

</t:column>

-----
BEAN:
-----

public void selectReference(ActionEvent event) {
...

UIParameter component = (UIParameter) event.getComponent().findComponent("editId");

String id = component.getValue().toString();

this.setReference(db.loadReference(id));

}

It looks like the method selectReference is invoked over and over again (for each column in the dataTable), which results in the fact that always the last reference is selected (and displayed in the editor) at the end.

Anybody knows why ActionListeners could be invoked more than once?

Thanks for any help!

Thierry

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to