0
我有一個h:selectOneMenu
,它在過去沒有問題,但由於某些原因,searchResults.selectedCategories
在提交表單時始終爲空。h:selectOneMenu值在提交表單時始終爲空
小部件在表單內。支持bean具有selectedCategories
作爲具有訪問器方法的私有字符串。我嘗試清理該項目,關閉Eclipse,並將其重新發布給Tomcat。什麼都沒有任何想法爲什麼?
這是小工具:
<h:selectOneMenu id="categoriesBoxSimple" value="#{searchResults.selectedCategories}" >
<f:selectItem itemLabel="Category 1" itemValue="283331" />
<f:selectItem itemLabel="Category 2" itemValue="281" />
<f:selectItem itemLabel="Category 3" itemValue="1115"/>
</h:selectOneMenu>
「沒有什麼工作」是不是你的實際問題進行適當的描述。 - 查找驗證錯誤,檢查是否調用setter方法。 – stg
你是絕對肯定的表單不嵌套和ajax行動 - 如果任何 - 也正在執行/處理菜單?儘管如此,你的問題必須是http://stackoverflow.com/questions/2118656/commandlink-commandbutton-ajax-backing-bean-action-listener-method-not-invoked/2120183#2120183 – BalusC
@BalusC爲我測試添加添加到窗口小部件,現在可以捕獲值。但是在提交表單時不會。我在頁面上的相同位置還有其他類似的小部件,並且它們按預期工作。 –
Eddy