a4j:repeat 内にいくつかのドロップダウン メニューを配置しようとしています。2 番目のドロップダウンの値は、最初に選択した値に依存します。以下は私が使用しようとしているコードですが、空白のパラメーターを渡します:
<a4j:repeat id="localRepeat" var="local" value="#{InstanceController.instance.locations}" rowKeyVar="row">
<h:panelGrid columns="2">
<h:outputLabel value="Theater:" />
<h:selectOneMenu id="theater" converter="#{TheaterConverter}" value="#{local.theater}">
<f:selectItems id="theaters" value="#{InstanceController.allTheaters}" />
<a4j:support event="onchange" action="#{InstanceController.getAllCountriesInTheater}" reRender="country" >
<f:param name="theater" value="#{local.theater.id}"/>
</a4j:support>
</h:selectOneMenu>
<h:outputLabel value="Country:" />
<h:selectOneMenu immediate="true" id="country" converter="#{CountryConverter}" value="#{local.country}">
<f:selectItems value="#{InstanceController.allCountriesInTheater}" />
<a4j:support event="onchange" reRender="state" />
</h:selectOneMenu>
</h:panelGrid>
<rich:spacer height="10px" />
</a4j:repeat>
「#{local.theater.id}」の代わりに「1」を送信するように f:param を変更すると、期待どおりに動作します。
最初のドロップダウンで選択した値を取得し、それをパラメーターとして送信する方法はありますか?