Faces-config.xml が、Controller クラスのインライン アノテーション ViewScoped を RequestScoped でオーバーライドしていたことが判明しました。それを修正し、問題を解決したようです。
この質問には答えがありません 。commandButton/commandLink/ajax アクション/リスナー メソッドが呼び出されていないか、入力値が更新されていません。そうであると思われる場合は、primefaces fluidGrid 拡張機能を使用して実際の修正/例を提供してください。
私はprimefaces ui exension fluidGridを使用しています: http://fractalsoft.net/primeext-showcase-mojarra/sections/fluidgrid/dynamic.jsf
profileController.testControl() を呼び出すことができないようです。commandButton を fluidGrid の外側に配置すると、正常に動作しますが、グリッド内では動作しません。何か案は?
Bean を @ViewScoped に変更してテストしましたが、ネストされたフォームなどはありません。
<?xml version="1.0" encoding="UTF-8"?>
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:p="http://primefaces.org/ui"
xmlns:pe="http://primefaces.org/ui/extensions"
xmlns:composite="http://java.sun.com/jsf/composite">
<composite:interface>
<composite:attribute name="resultList" />
</composite:interface>
<composite:implementation>
<h:form id="form1" rendered="true">
<!-- Grid -->
<pe:fluidGrid value="#{resultList}" var="showvar" hGutter="20" rowKeyVar="rowKey" fitWidth="true" hasImages="true" rendered="true" >
<pe:fluidGridItem rendered="true" >
<p:panel id="seriesPanel" rendered="#{showvar.isSeries()}"></p:panel>
<p:panel id="episodePanel" rendered="#{!showvar.isSeries()}" >
<p:commandButton value="click me" action="#{profileController.testControl()}"/>
<!-- another button attempt that doesn't work -->
<p:commandButton process="fluidGrid" value="click me again" ajax="false" actionListener="#{profileController.testControlEvent()}" />
</p:panel>
</pe:fluidGridItem>
</pe:fluidGrid>
</h:form>
</composite:implementation>
</html>
//Tried with @ViewScoped as well
@Model
public class ProfileController {
public void testControl(){
log.info("---------------------------------------");
log.info("TEST CONTROL CLICKED");
log.info("---------------------------------------");
}
public void testControlEvent(ActionEvent actionEvent){
log.info("---------------------------------------");
log.info("TEST CONTROL CLICKED");
log.info("---------------------------------------");
}
}