Details
-
Type:
Bug
-
Status: Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 3.3, EE-3.3.0.GA
-
Fix Version/s: EE-3.3.0.GA_P01, 4.0.BETA, 4.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:-
-
Assignee Priority:P1
-
Salesforce Case Reference:
Description
When using the comboBox's listValue to populate the drop down, the filter searches based on the item value and not the label. This is obviously not intuitive for users. For example:
<ace:comboBox listVar="department" listValue="#{testBean.departments}" itemValue="#{department.id}"
filterMatchMode="contains">
<f:facet name="row">
<h:outputText value="#{department.name}" />
</f:facet>
<ace:ajax execute="@this" render="@all" />
</ace:comboBox>
renders:
<span class="ui-combobox-item-label"><span id="iceForm:selectDepartment:0:_t7">Test 1</span></span>
........
<span class="ui-combobox-item-value" style="visibility:hidden;display:none;">1</span></div>
Typing in 'Test 1' does not return a matching value.
<ace:comboBox listVar="department" listValue="#{testBean.departments}" itemValue="#{department.id}"
filterMatchMode="contains">
<f:facet name="row">
<h:outputText value="#{department.name}" />
</f:facet>
<ace:ajax execute="@this" render="@all" />
</ace:comboBox>
renders:
<span class="ui-combobox-item-label"><span id="iceForm:selectDepartment:0:_t7">Test 1</span></span>
........
<span class="ui-combobox-item-value" style="visibility:hidden;display:none;">1</span></div>
Typing in 'Test 1' does not return a matching value.
Issue Links
- depends on
-
ICE-9427 ace:comboBox - Issues when SelectItem label and value don't match
-
- Closed
-
This change was already made as part of
ICE-9427. I verified that now the filtering/autocomplete functionality is based on labels and not on the values.I fixed an issue I detected while testing this. When using filtering, the wrong label was being shown in the text field after making a selection. This was because the generated list of results is usually different than the model list, and thus the indexes were different. Committed this fix to trunk at revision 37327 and to the p01 tag at revision 37328.