呼び出したときに PrimeFaces ビューで理由がわかりません
<f:setPropertyActionListener value="#{item}" target="#{tagController.current}" />
バッキング Bean の tagController.setCurrent メソッドを呼び出すことはありません。
私は次の見解を持っています:
<h:form id="tableForm" styleClass="form-horizontal">
<h:panelGroup id="dataPanel">
<p:dataTable value="#{tagController.lazyModel}"
lazy="true"
id="table"
var="item"
paginator="true"
rows="10"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="10,20,50" >
<p:column headerText="Name" sortBy="#{item.name}" filterBy="#{item.name}">
<h:outputText value="#{item.name}"/>
</p:column>
<p:column>
<p:commandLink id="testButton" update=":testForm:panel" process="@this">
<h:outputText value="Test" />
<f:setPropertyActionListener value="#{item}" target="#{tagController.current}" />
</p:commandLink >
</p:column>
</p:dataTable>
</h:panelGroup>
</h:form>
<br/>
<h:form id="testForm" styleClass="form-horizontal">
<p:panelGrid columns="4" id="panel" >
<h:outputLabel value="Name: #{tagController.current.name}" />
</p:panelGrid>
</h:form>
および次のバッキング Bean:
@ViewScoped
@Named
public class TagController implements Serializable {
@Inject
TagFacade tagFacade;
protected LazyDataModel<Tag> lazyModel;
protected ResourceBundle bundle = ResourceBundle.getBundle("resources/messages");
@Getter
protected Tag current = new Tag();
public void setCurrent(Tag current) {
System.out.println(">>>>>>>>>> THIS METHOD IS NEVER CALLED ? WHY ?");
this.current = current;
}
public LazyDataModel<Tag> getLazyModel() {
//... omitted for brevity
}
}
データテーブルはうまく機能しています。データ、ページネーター、フィルター、および並べ替えはうまく機能していますが、テスト リンクをクリックしても何も起こりません (例外、HTML ページへの JavaScript エラー、stdout へのメッセージ出力はありません...)。
Glassfish 3.1.2 / Mojarra 2.1.22 / PrimeFaces 3.5 を使用しています。
誰かが私を助けることができますか?
よろしくお願いします...