incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeffry Houser <jef...@dot-com-it.com>
Subject Re: combo box
Date Tue, 10 Apr 2012 19:17:37 GMT
On 4/10/2012 2:59 PM, Dany Dhondt wrote:
> Hi,
>
> Now there's a discussion about the comboBox, I'd like to address an issue. Sorry in advance
if it had been addressed already.
>
> Using the component, one can set the selectedIndex or the selectedItem properties. There's
no way to set a 'selectedValue' property.
> I've solved this by using a custom component based on what I found here.
> The issue is that when you have a dataProvider with a collection of objects, you should
be able to set the selectedItem of the combobox based on one of the attributes of the object.
> When the object has a property named 'customObjectID', one should be able to set the
comboBox 'valueField' to 'customObjectID' and then set the selectedValue property to whatever
value the object's customObjectID is.
> Is there a possibility to add this feature to ComboBox?
  Yes, I've implemented that in the Flextras (MX) AutoCompleteComboBox.

  I gave it a selectedValue property, a valueField property, and a 
valueFunction property; similar--in concept--to how the selectedItem, 
labelField, and labelFunction work.

  Really the code is just a layer of abstraction for a loop.  If I were 
to implement something like that in the framework, I'd probably to up to 
List or ListBase as opposed to making it ComboBox specific.



-- 
Jeffry Houser
Technical Entrepreneur
203-379-0773
--
http://www.flextras.com?c=104
UI Flex Components: Tested! Supported! Ready!
--
http://www.theflexshow.com
http://www.jeffryhouser.com
http://www.asktheflexpert.com
--
Part of the DotComIt Brain Trust


Mime
View raw message