This content has been marked as final. Show 4 replies
I've just come accross the same problem in my code and it seems the creationComplete won't work on the comboBox because it gets created before the dataProvider is populated.
I found this article which might be of help:
I plan to look into this further in the morning, I'm off home now :o)
If you found a solution can you post it here?
You need to calculate and set the selectedIndex from the result handler of the data service call.
You should be able to set an instance variable and bind the combobox selectIndex to that variable.
Okay - Got it working.....
I'm using the Cairngorm framework and created a variable in my model. The selectedIndex of my comboBox is bound to this variable. In the result handler for the remote object call, I change the varibale defined in the model and it now resets the comboBox. :o)
Originally I had the variable in my model set to be the value that I wanted the comboBox to default to and when I was setting it in the result handler, it wasn't working. When I set the variable in my model to be -1, it worked.