私は PrimeFaces 3.5 を使用していますが、ユーザーにダイアログでデータを入力または選択するように依頼したいと考えています (oneSelectMenu を選択するか、inputTextarea にデータを挿入します)。また、テーブルを使用して UI を配置します。
しかし、ダイアログのユーザーからの値は、バッキング Bean に送信されません。ダイアログで使ったからだと思います。
oneSelectMenu の 1 つをダイアログの外に移動しようとしましたが、うまくいきました。
何が悪いのか知っている体はありますか?どんな反応でも大歓迎です。
私のバッキング Bean は、一種の標準的なゲッターとセッターです。(バッキング Bean はダイアログの外で問題なく動作するため、問題はないと思います)
そして、これは私のxhtmlコードです:
<p:dialog id="dlgNew" header="New Action Item" widgetVar="dlg1" modal="true" resizable="false"
width="40%" height="55%" appendToBody="true">
<table>
<tr>
<td><p:outputLabel value="Detail"/></td>
<td>:</td>
<td><p:inputTextarea rows="5" cols="40" value="#{aiBean.detail}"/></td>
</tr>
<tr>
<td><p:outputLabel value="Status"/></td>
<td>:</td>
<td><p:selectOneMenu effect="fade" value="#{aiBean.status}">
<f:selectItem itemLabel="Not Started" itemValue="Not Started" />
<f:selectItem itemLabel="On Progress" itemValue="On Progress" />
<f:selectItem itemLabel="Finished" itemValue="Finished" />
</p:selectOneMenu>
</td>
</tr>
<tr>
<td></td><td></td>
<td>
<p:commandButton value="Add" action="#{aiBean.insertAi}"/>
<p:commandButton value="Cancel" onclick="dlg1.hide()"/></td>
</tr>
</table>