On Thu, Jun 24, 2010 at 02:46, tank <[email protected]> wrote:
>    Assume i have two widgets A and B in host page. They bind to
> datasource DSA and DSB respectly. I do some stuff in A then DSA has
> changed. DSA's change leads to  DSB's change. Question is:
>    How to reflect DSB's change on B and where to put such code?
>    I can let widget A has a reference of B. When the rpc call for
> changing DSA finished i call B's some function to refresh B's data.
> Another way is keeping widget A and B seperately and to put this logic
> in entrypoint. But first, refresh data always means refilling , i cant
> do it with an incremental manner. Second, when we have more than two
> widgets whose datasources all have relationship with other, the code
> will become more ugly and hard to maintain.
>    I am not familiar with RIA, i used to write some jsps/servlets and
> just jump from page to page. I dont need worry about data
> refreshing.Then what's the common way in GWT?
>

One option is to make it event driven. So once A is updated, it fires
some sort of event, triggering all listeners on it to do whatever
appropriate. The advantage of this approach is that as you add more Bs
and Cs and Ds in, the complexity doesn't grow out of control.

HTH.

-- Joe


-- 
Proper software development is like female orgasm. Some claim it's a
myth, others try very hard to make it happen but don't know how, and
most magazines, books and videos showing it are showing faked ones.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to