selectOneMenu
ここでのショーケースの例とまったく同じように、Primefaces 5.2 を使用して、1 つの結果がselectOneMenu
Ajax を介して 2 番目に更新されるモバイル フォームを作成したい: http://www.primefaces.org/showcase/ui/ajax/dropdown.xhtmlしかし、モバイル バージョン.
私の質問はこれと非常によく似ています: Primefaces Mobile の Ajax は <p:selectOneMenu> を更新しませんが、答えはありません。
ショーケースの例とまったく同じようにJSF ページと backingbean を作成しましたが、動作します。
<f:view renderKitId="PRIMEFACES_MOBILE" />
ただし、更新後に2番目を使用してモバイルの側面を追加するselectOneMenu
と、プレーンにレンダリングされ、永続的なスピナーが表示されます。
...
<f:view renderKitId="PRIMEFACES_MOBILE" />
...
<h:body>
<h:form>
<p:growl id="msgs" showDetail="true" />
<p:panel header="Select a Location" style="margin-bottom:10px;">
<h:panelGrid columns="2" cellpadding="5">
<p:outputLabel for="country" value="Country: " />
<p:selectOneMenu id="country" value="#{dropdownView.country}" style="width:150px">
<p:ajax listener="#{dropdownView.onCountryChange}" update="city" />
<f:selectItem itemLabel="Select Country" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{dropdownView.countries}" />
</p:selectOneMenu>
<p:outputLabel for="city" value="City: " />
<p:selectOneMenu id="city" value="#{dropdownView.city}" style="width:150px">
<f:selectItem itemLabel="Select City" itemValue="" noSelectionOption="true" />
<f:selectItems value="#{dropdownView.cities}" />
</p:selectOneMenu>
<p:outputLabel for="debug" value="Debug: " />
<p:inputText id="debug" value="#{dropdownView.debug}"/>
</h:panelGrid>
...
debug
私の更新ターゲットinputText
が更新されている場合、Ajax呼び出しは機能しますが、更新ターゲットがそうでない場合は機能city
しselectOneMenu
ます。
これはバグですか?モバイルの側面を誤用していませんか? これに関するドキュメントは不足しているようです。
編集
inputText
ソースに含まれていませんでした。修正しました。