Just found this thread. I see that for Carlos binding was also didn't work in
item renderer. I did deeper investigation and look into List and ComboBox
html package. I think for those components there is a bug or something is
not implemented yet.

Let's take look in ComboBox where I have simple code:
https://paste.apache.org/TYEr - It's not working my property selectedItem
won't fill when I change items in ComboBox.

ComboBox class has for "selectedItem":

[Bindable("change")]
public function get selectedItem():Object { } - It's ok, but it isn't
dispatched anywhere - Should it be dispatched from ComboBoxView or Model ? I
think from Model.

Same situation is for List - it doesn't even have this Bindable("change") -
I think we should agree on one direction - what should be exposed to the
user.

Models can expose different events (selectedIndexChanged etc.) - cause In
most cases Model notify -> ComboBoxView, ListView.

Example of solution:

ArraySelectionModel dispatch -> dispatchEvent(new
Event("selectedIndexChanged"));
ComboBoxView listen to this and do some UI changes

Case 1) ComboBox, List listen to this event dispatched from Model
[Bindable("selectedIndexChanged")
public function get selectedItem():Object
                {
                        return IComboBoxModel(model).selectedItem;
                }

Case 2) ComboBox, List listen to "change" dispatched by ArraySelectionModel
dispatchEvent(new Event("selectedIndexChanged")); - View is doing something 
dispatchEvent(new Event("change")); - ComboBox, List class is doing
something - event exposed to the end user

[Bindable("change")
public function get selectedItem():Object
                {
                        return IComboBoxModel(model).selectedItem;
                }


If we agree on this and I'm not wrong with my assumption and this is a bug I
can provide fix for both components.

Piotr





-----
Apache Flex PMC
piotrzarzyck...@gmail.com
--
View this message in context: 
http://apache-flex-development.2333347.n4.nabble.com/FlexJS-How-Binding-works-tp57096p57777.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

Reply via email to