|
Hi Mehdi To use ModelLocator and transfer VO is perfectly fine. Eg. I have a Datagrid dp=”ModelLocator.organizations”
and when I select in the datagrid I have ModelLocator.organization =
SelectedItem which I send to my J2EE server in your case CF. import com.VO.*; class model.ModelLocator implements
org.nevis.cairngorm.model.ModelLocator { public static function initialise()
: Void { } //---------------------------------------------------------------------------- public static var
organizations : Array; public static var
organization : OrganizationalUnitVO; } From: Great. That sounds exciting and a very
good approach. The way I’m implementing is that I have a ModelLocator,
which has models as properties. Now should those individual models make the
ValueObjects available to views or just their own properties? Why I am leaning
towards VOs is so that it’s easier for me to send them over to CF. Does
that sound ok? Thanks Agha Mehdi From: Exactly. I found after implementing
the ModelLocator, I pretty much wiped out the need for ViewHelpers. The
only thing I use the ViewHelpers for now is setting focus on fields! It
makes things a lot more organized and simplified. You are right
though. Just initialize it in the app init event and you will be able to
use it anywhere, anytime. Dustin Mercer From: Hi All, How does ModelLocator work? I am looking at the
sample store and it makes sense but I am kind of confused. What I have understood so far is that ModelLocator Properties are
bound to views and Commands manipulate ModelLocator
to update views. Is ModelLocator available to the entire application once it gets
initialized on the root level? If it works like that then it means that I'd
hardly ever need ViewLocators??? I can create models, initialize them in
ModelLocator and use them wherever I want in the app????? Thanks Agha Mehdi IDT - eBusiness Program Manager Work: 408.284.8239 Fax: 408.284.2766
|
Title: ModelLocator
- RE: [flexcoders] ModelLocator Shahnavaz Alware
- RE: [flexcoders] ModelLocator Mercer, Dustin

