On my page, I have a button that opens a list of items in a popup window. When I select 1 item in the list, I want to pass the item ID to the backingbean of my first page. Is it possible? He tried to do this with a4j:jsFunction and a4j:jsFunction a4j:param , but it does not work.
This is my code:
page 1:
<a4j:jsFunction name="renderGuarantor" render="guarantor" actionListener="#{prospectDetail.setNewGuarantor}"> <a4j:param name="param1" assignTo="#{prospectDetail.newGuarantorId}" /> </a4j:jsFunction>
popuppage:
<h:outputLink value="" onclick="window.opener.renderGuarantor(#{applicant.deposit_id});window.close();"> <h:graphicImage style="padding:0 1px; border:0" value="${path.staticRootUrl}images/confirm.gif" alt="${msg.applicantslist_select}" title="${msg.applicantslist_select}"/> </h:outputLink>
And this is the bean support code for the first page
private Integer newGuarantorId; public void setNewGuarantor() { guarantor = newGuarantorId; } public Integer getNewGuarantorId() { return newGuarantorId; } public void setNewGuarantorId(Integer newGuarantorId) { this.newGuarantorId = newGuarantorId; }
When selected from a popup menu, the method in my backingbean is called, but newGuarantorId is null and setNewGuarantorId never called.
Is there a solution to my problem?
source share