History | Log In     View a printable version of the current page.  
Issue Details (XML)

Key: SDK-14751
Type: Minor Enhancement Minor Enhancement
Status: Closed Closed
Resolution: Fixed
Priority: C C
Assignee: Ella Mitelman
Reporter: Radu Cocieru
Votes: 5
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
Flex SDK

List.selectedItem(s) to match items from the DataProvider and selectedItem(s) by uid

Created: 02/22/08 08:27 AM   Updated: 05/15/09 01:53 AM
Component/s: mx: List
Security Level: Public (All JIRA Users )

Issue Links:
Cloners
This issue is cloned by:
SDK-16702 ComboBox/ComboBase.selectedItem(s) to... Closed
 

Severity: Enhancement/Task
Reproducibility: Every Time
Discoverability: Medium
Found in Version: SDK Flex 3 (Released)
Milestone: SDK Gumbo - Release
Steps to Reproduce:
Consider a scenario when a list of all possible options come from a dataservice, and a subset of this list is comming on another call that says SelectedItems

If I choose to display this in a List like component with multiple selection turned on, I cannot just pass the subset to selected Items because it will not select them since the subset contains copies of the objects in DataProvider not references to them.

in ListBase around line 6336
 if (data == items[i]) .. compares the "pointers" to the objects instead it should compare the UIDs of the objects .. this way a user can implement IUID and have objects with the same properties return the same UID ... this is very useful when working with data from tables.


A quick patch is to replace that line with the next one:

if (itemToUID(data) == itemToUID(items[i]) ) - not the optimal way but does the trick
 
 
Language Found: English
Bugbase Id: none
Triaged: Yes
Regression: No
QA Owner: Ella Mitelman
Resolved by: Alex Harui
Fixed Version: SDK Flex 3.4.0 - Next Build
Confirmed Version: SDK Flex 3.4.0 - Next Build
Participants: Alex Harui, Benoit Moraillon, Ella Mitelman, Geoff Hichborn, Jim Cheng, Lauren Park and Radu Cocieru


 Description  « Hide
Consider a scenario when a list of all possible options come from a dataservice, and a subset of this list is comming on another call that says SelectedItems

If I choose to display this in a List like component with multiple selection turned on, I cannot just pass the subset to selected Items because it will not select them since the subset contains copies of the objects in DataProvider not references to them.

in ListBase around line 6336
 if (data == items[i]) .. compares the "pointers" to the objects instead it should compare the UIDs of the objects .. this way a user can implement IUID and have objects with the same properties return the same UID ... this is very useful when working with data from tables.


A quick patch is to replace that line with the next one:

if (itemToUID(data) == itemToUID(items[i]) ) - not the optimal way but does the trick





 All   Comments      Sort Order:
Ella Mitelman - [07/17/08 04:32 PM ]
Can we do it in Gumbo List?

Lauren Park - [08/13/08 07:11 AM ]
(No priority set on this bug. Auto update to C - please adjust if necessary)

Geoff Hichborn - [08/28/08 04:59 PM ]
I came across the same issue with ComboBox/ComboBase. I would really like to see this fixed.

Lauren Park - [01/12/09 08:30 PM ]
Milestone changed to Gumbo Release from SDK Community.

Jim Cheng - [02/24/09 01:12 PM ]
Patch submitted (#SDK-19508) on a related issue (#SDK-12631) that also addresses this particular one.

See also #SDK-15696, as this seems to be essentially the same situation.

Alex Harui - [03/26/09 06:29 PM ]
svn 5616

Ella Mitelman - [03/28/09 07:10 PM ]
verified

Benoit Moraillon - [05/15/09 01:53 AM ]
ComboBase is always checking for pointer equality instead of uid equality in sdk revision 6943
SDK-16702 should be re-opened.

Thanks.