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 <[email protected]> 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > > -- 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.
