这个想法是基于customer combobox
上的选定值来级联store combobox
的值。下面是一个代码片段:
<rich:comboBox directInputSuggestions="true" width="220"
listStyle="text-align:left;" enableManualInput="false"
id="customerList" value="#{gpsReport.selectedCustomer}" >
<a4j:support actionListener="#{gpsReport.selectCustomer}"
event="onchange" reRender="storeList"
ajaxSingle="true" limitToList="true" />
<f:selectItems value="#{gpsReport.customers}" />
</rich:comboBox>
商店组合框:
<rich:comboBox directInputSuggestions="true" width="220"
listStyle="text-align:left;" enableManualInput="false"
id="storeList" value="#{gpsReport.selectedStore}">
<a4j:support actionListener="#{gpsReport.selectStore}"
event="onchange"
ajaxSingle="true" limitToList="true" />
<f:selectItems value="#{gpsReport.stores}" />
</rich:comboBox>
这实际上是在IE8上工作的。但是,在IE9上,更改客户组合框的值会删除商店组合框。我想知道发生了什么事。
谢谢你如此!
x不支持IE9。更多细节请参考以下回答:https://stackoverflow.com/a/7326359/854386