私はjsf、primefaces、およびjpaを使用してアプリケーションを開発しています。私が直面している問題の 1 つは、ダイアログ ウィンドウでラジオ ボタンとデータ テーブルを使用していることです。私の条件は、アクションからメソッドを呼び出してデータのリストを取得する選択ラジオボタンにありますが、データテーブルに値をロードする必要があります。しかし、データテーブルに値をロードしていません
ここに私のxhtmlコードがあります
<p:dialog header="RxnNo" widgetVar="dlg3" height="500" width="800">
<p:selectOneRadio id="series" value="#{curation.series}">
<f:selectItem itemLabel="SGML" itemValue="1" />
<f:selectItem itemLabel="9000" itemValue="2" />
<f:selectItem itemLabel="8500" itemValue="3" />
<p:ajax listener="#{curation.getSeries9000}" update="seriesDataTable" />
</p:selectOneRadio>
<p:dataTable id="seriesDataTable" var="series" value="#{homePage.reactionsList}" widgetVar="seriesTable" scrollRows="20" scrollable="true" rowIndexVar="rowIndex">
<p:column headerText="Id" filterBy="#{rowIndex+1}">
<h:outputText value="#{rowIndex+1}" />
</p:column>
</p:dataTable>
</p:dialog>
ここに私のJavaコードがあります
public void getSeries9000() throws Exception {
try {
if (series.equals("2")) {
series9000List = cationController.getAllSeries9000();
}
} catch (Exception ex) {
ex.printStackTrace();
}
}
誰でもこの問題を解決するのを手伝ってくれますか?