Как передать значение параметра в a4j:jsFunction

На моей странице есть кнопка, которая открывает список элементов во всплывающем окне. Когда я выбираю 1 элемент в списке, я хочу передать id элемента в backingbean моей первой страницы. Возможно ли это? Я пытался сделать это с помощью a4j:jsFunction и a4j:param, но это не работает.

Вот мой код:

страница 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>

А это код backing bean для первой страницы

private Integer newGuarantorId;
public void setNewGuarantor()  {
    guarantor = newGuarantorId;
}

public Integer getNewGuarantorId() {
    return newGuarantorId;
}

public void setNewGuarantorId(Integer newGuarantorId) {
    this.newGuarantorId = newGuarantorId;
}

При выборе в popup вызывается метод в моем backingbean, но newGuarantorId равен null и setNewGuarantorId никогда не вызывается.

Есть ли решение моей проблемы?

6
задан higuaro 1 October 2014 в 16:07
поделиться