Hello all,

I'm new with Cairngorm, trying to develop a wizard RIA with flex, and
I encountered an issue with data binding that went ugly:
In my model I have an XML doc taht describes several available search
services from the server. This XML is retrieved when the app start by
using an appropriate command that uses business delegate.

However, in the view I have a TabBar, that needs to manipulate the XML
config file from the model, meaning that it has to know when this xml
is retrieved.
I found few approaches to this:

1. use a fake getter-setter binded to the model. My drawback from this
approach is quite obvious, I don't really need a getter here, but a
notification...
2. custom [Bindable(event="....")]. This also not the best way as it
introduces new complexity to the model and enforces the developer to
dispatch an event...

3. Using a command to create the data for the TabBar in the view. I
think this creates a tightly coupled connection between the controller
and the view...

4. Using Paul Williams <ac:ObserveValue /> util. Although one might
think this creates a slick binding to function by hiding the fake
getter-setter, it actually dispatches redundant events because it
handler can't be compared to the source property, and thus the handler
is being called even when the source is null.

5. using curly braces:
<mx:TabBar dataProvider={getTabsLabels(_model.servicesList)} />
This approach also introduces redundant events as its destination is
not read-write enabled and it will get dispatched even when the
servicesList is null.
Moreover, I want to executes one more manipulation on the xml from the
model, it can be created while calling the getTabsLabels() but it
shouldn't be there as it won't be readable...


I'll be more than happy to hear your ideas.

Thanks a lot !

Almog Kurtser.

Reply via email to