Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.6
-
Component/s: ICE-Components
-
Labels:None
-
Environment:any
-
ICEsoft Forum Reference:
Description
users want to be able to show different entries with the same label in a selectInputText component, i.e. one would desire to show the following:
City | State | Country
Springfield | IL | USA
Springfield | MA |USA
trying this with the current release 1.6.0 results always in the last element to be selected in the backing bean code, because
the values of this component are stored within a map and the map's key is the SelectItems label. When there are more labels
with equal values only the last one will be stored in this map.
City | State | Country
Springfield | IL | USA
Springfield | MA |USA
trying this with the current release 1.6.0 results always in the last element to be selected in the backing bean code, because
the values of this component are stored within a map and the map's key is the SelectItems label. When there are more labels
with equal values only the last one will be stored in this map.
Issue Links
Activity
Michael Thiem
created issue -
Mark Collette
made changes -
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17900 | Fri Nov 14 17:54:05 MST 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/selectinputtext/SelectInputText.java
MODIFY /icefaces/trunk/icefaces/component/src/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java MODIFY /icefaces/trunk/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/bean/examples/component/selectInputText/CityDictionary.java MODIFY /icefaces/trunk/icefaces/bridge/lib/extras/autocomplete_ext.js |
Mark Collette
made changes -
Assignee | Mark Collette [ mark.collette ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #17905 | Mon Nov 17 10:38:16 MST 2008 | mark.collette | |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/bean/examples/component/selectInputText/SelectInputTextController.java
|
Mark Collette
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Fix Version/s | 1.8DR#2 [ 10142 ] | |
Resolution | Fixed [ 1 ] |
Mark Collette
made changes -
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 1.7.3 [ 10162 ] | |
Assignee Priority | P3 |
Ken Fyten
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #18668 | Thu Mar 26 14:14:04 MDT 2009 | mark.collette | Backport to ICEfaces 1.7 branch |
Files Changed | ||||
MODIFY
/icefaces/branches/icefaces-1.7/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/bean/examples/component/selectInputText/SelectInputTextController.java
MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java MODIFY /icefaces/branches/icefaces-1.7/icefaces/samples/component-showcase/common-src/org/icefaces/application/showcase/view/bean/examples/component/selectInputText/CityDictionary.java MODIFY /icefaces/branches/icefaces-1.7/icefaces/bridge/lib/extras/autocomplete_ext.js MODIFY /icefaces/branches/icefaces-1.7/icefaces/component/src/com/icesoft/faces/component/selectinputtext/SelectInputText.java |
Mark Collette
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Fix Version/s | 1.8DR#2 [ 10142 ] | |
Resolution | Fixed [ 1 ] |
Ken Fyten
made changes -
Salesforce Case | [] | |
Fix Version/s | 1.8 [ 10161 ] | |
Assignee Priority | P3 |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Mark Collette [ mark.collette ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #24353 | Wed Apr 06 09:40:02 MDT 2011 | yip.ng | ICE-6317: Regression: |
Files Changed | ||||
MODIFY
/icefaces2/branches/icefaces-2.0.x-maintenance/icefaces/compat/core/src/main/javascript/extras/extras.js
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #24354 | Wed Apr 06 09:47:35 MDT 2011 | yip.ng | ICE-6317: Regression: |
Files Changed | ||||
MODIFY
/icefaces2/trunk/icefaces/compat/core/src/main/javascript/extras/extras.js
|
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #31506 | Tue Oct 16 12:12:23 MDT 2012 | yip.ng | ICE-8616: REGRESSIONS - |
Files Changed | ||||
MODIFY
/icefaces3/trunk/icefaces/compat/components/src/main/java/com/icesoft/faces/component/selectinputtext/SelectInputTextRenderer.java
|
The SelectInputText component no longer keeps a Map of String labels to SelectItem objects. As well, when a list selection is made by the user, the list index is transmitted from the browser, and not just the label. This way, in the textChangeListener and valueChangeListener, SelectInputText.getSelectedItem() can be called, to get the exact selected item, regardless of whether there are entries with duplicated labels.
The caveat being that, with state saving, the value field of the SelectItem objects needs to be Serializable, or else the selectedItem won't be saved, and it should implement equals(), to be comparable, when de-Serialized to the original SelectItem. Regardless if the selectedItem is state saved, it will at least be valid through the textChangeListener and valueChangeListener invocations, in the lifecycle when the user has selected an entry from the list.
Because components always resubmit their values for every form submit, including partialSubmits, the SelectInputText component will decode the submitted label each lifecycle, but only decodes the list index selections from user interactions. So, the selectedItem can be lost over subsequent form submits. If there is exactly one matching SelectItem label, the selectedItem will be set to it. But, it will not match if there are duplicate labels, like it used to.
Subversion 17900
icefaces\bridge\lib\extras\autocomplete_ext.js
icefaces\component\src\com\icesoft\faces\component\selectinputtext\SelectInputText.java
icefaces\component\src\com\icesoft\faces\component\selectinputtext\SelectInputTextRenderer.java
icefaces\samples\component-showcase\common-src\org\icefaces\application\showcase\view\bean\examples\component\selectInputText\CityDictionary.java
Subversion 17905
icefaces\application\showcase\view\bean\examples\component\selectInputText\SelectInputTextController.java