<mx:Binding and ChangeWatcher don't show me cool,
Imagine a DTO with 10 attributes, I'll need to have 10 <binds too.

Using a ModelLocator to storage data cache, I think that this solution is 
better:

<mx:TextInput text="{model.user}"/>

<mx:Button click="controller.save(user)"/>

<user:User id="user" login="{inputLogin.text}"
 password="{inputPassword.text}"/>

..

public var model:MyModel;
public var controller:MyController;

...

What do you think about it?


--- In [email protected], Anggie Bratadinata <anggie.bratadin...@...> 
wrote:
>
> Can ChangeWatcher be used in your case ?
> 
> -- 
> Anggie Bratadinata | www.masputih.com | Indonesia
> 
> On Thu, Mar 5, 2009 at 11:39 PM, Rodrigo Pereira Fraga <rpf...@...>wrote:
> 
> > Hi,
> >
> > I'm looking for a better solution for it.
> > I have two solutions:
> >
> > 1- With a model declared with a DTO(MXML)
> > <user:User id="user" login="{inputLogin.text}"
> > password="{inputPassword.text}"/>
> >
> >
> > 2- With custom components, like it:
> > <apolloti:TextInputBindable
> > text="{model.user.login}"
> > entity="{model.user}" attribute="login"/>
> >
> > But I'm not happy. Does anybody has an another solution?
> > The problem is that the [Bindable] doesn't have a bind bi-direcional, like
> > Seam....
> >
> > Thanks
> >
> >
> >
> >
>


Reply via email to