0
我有聽衆的問題在沒有被調用下面selectOneMenu用於沒有被調用監聽
<h:selectOneMenu id="Country" value="#{bean.country}">
<f:ajax render="inputId" listener="#{backingBean.clearMethod}" />
<f:selectItem itemLabel="-Select One-" itemValue="_" noSelectionOption="true"/>
<f:selectItems value="#{optionValues['countryList']}" />
</h:selectOneMenu>
<h:inputText id="inputId" value="#{bean.city}"/>
的optionValues解析器用於解析從XML文件的國家列表選項。 它有美國,加拿大和墨西哥。我的問題是,當我將選項從美國更改爲加拿大或選擇一個美國時,clearMethod
被調用。但是當我將選項從USA更改爲Select One時,不會調用clearMethod
。
任何幫助,將不勝感激。
拆除項目值沒有幫助,但它工作時,我改變了值從'_'到其他東西,比如'SelectOne',它可以工作 – 2012-04-19 19:44:37
如果我在提交表單時更改'itemValue',它接受'SelectOne'值並提交頁面。 – 2012-04-19 19:50:48