I Feel Facade design pattern will help you solving the issue. This is basically a design issue.
Thanks & Regards
Anirban Talukdar
looks like I need to find a good book on design patterns.
On Dec 16, 2:09 pm, Anirban Talukdar <talukdar.anir...@gmail.com>
wrote:
> I Feel Facade design pattern will help you solving the issue. This is
> basically a design issue.
>
> Thanks & Regards
> Anirban Talukdar
>
> On Wed, Dec 16, 2009 at 12:31 PM, jax <jackma...@gmail.com> wrote:
> > HI
>
> > I have a questions about communication in GWT and java in general.
>
> > In an effort to better modularize my application I have made a number
> > of different composites. I then have a main application that links
> > together all the composites.
>
> > The problem comes when I need to communicate between composites, for
> > example change an image in a composite based on an event in another
> > composite.
>
> > They way I have don this now is by passing "this" to every composite
> > constructor and saving it as parent. I also have methods that allow
> > me to get the children of a composite. Then in each composite I have
> > a getCompositeParent() method that will allow me to go further down
> > the composite tree.
>
> > For example:
>
> > parent.getCompositeParent().getCompositeParent().getNamesComposite
> > ().getName().setText("hello");
>
> > This seems a bit unwieldy. Is this the normal way of doing things in
> > JAVA?
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to google-we...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-web-tool...@googlegroups.com<google-web-toolkit%2Bunsu...@googlegroups.com>
Basically, the idea is that whenever something "interesting" happens,
a Composite raises an event, which all other composites get a chance
to process. Most composites will just simply "let it pass", but those
who find it relevant, can update themselves.