Jsf 2 rich:添加/删除操作后,拾取列表将丢失其排序顺序
我将Richfaces 4.2.2与JSF2一起使用,并具有以下选择列表代码:Jsf 2 rich:添加/删除操作后,拾取列表将丢失其排序顺序,jsf-2,richfaces,Jsf 2,Richfaces,我将Richfaces 4.2.2与JSF2一起使用,并具有以下选择列表代码: <rich:pickList id="internationalTransactionCountriesPicklist" value="#{currentRuleItem.ruleControls.GeographicControl.selectedValues}" sourceCaption="#{msg.AvailableCountries}" targetCaption="#{m
<rich:pickList id="internationalTransactionCountriesPicklist"
value="#{currentRuleItem.ruleControls.GeographicControl.selectedValues}"
sourceCaption="#{msg.AvailableCountries}"
targetCaption="#{msg.SelectedCountries}"
addText="#{msg.picklistSelectItemButtonLabel}"
addAllText="#{msg.picklistSelectAllItemButtonLabel}"
removeText="#{msg.picklistDeselectItemButtonLabel}"
removeAllText="#{msg.picklistDeselectAllItemButtonLabel}"
listHeight="150px"
disabled="#{userSettings.userIsReadOnly}"
readonly="#{userSettings.userIsReadOnly}">
<f:ajax event="additems" render="@this" execute="@this" />
<f:ajax event="removeitems" render="@this" execute="@this" />
<f:selectItems value="#{controls.fullCountryList}"
var="country" itemValue="#{country.countryCode}"
itemLabel="#{country.displayName}" itemLabelEscaped="true" />
</rich:pickList>
controls.fullCountryList是自定义国家/地区对象的列表。自定义国家/地区类实现可比较的接口
将源列表中的项目添加到目标列表,然后从目标列表中删除此项目时,会出现问题。当它被添加回源代码列表时,它会被放在源代码列表的底部(在源代码列表中没有按原来的字母顺序排序) 有人知道解决这个问题的方法吗 RF3中存在一个针对它的漏洞
谢谢我为这个问题添加了一个简单的解决方案: