I didn't find any real solution, so I'll have to maintain the
dependent module list in two places (code and xml).

Bummer.

Dan

On Aug 9, 8:54 am, mooreds <[email protected]> wrote:
> Hi folks,
>
> I have a bit of a peculiar need.  I work on a site with a number of
> disparate GWT modules:
>
> moduleA
> moduleB
> moduleC
>
> They all attach to different spans and enhance site functionality.
>
> To load them all when the page loads, I have a loader module
> (loaderModule) which inherits from all modules.
>
> That's all well and good when a page is loaded normally.  However, I'm
> now looking at having the page loaded via XMLHttpRequest aka
> RequestBuilder.  In this case, loaderModule.onModuleLoad() method is
> never called automatically.  When I try to call it, nothing happens.
>
> Here's example code:
> -------------------
>
> RequestBuilder rb = new RequestBuilder(RequestBuilder.GET,"myurl");
>
> rb.setCallback(new RequestCallback() {
>                 @Override
>                 public void onResponseReceived(Request request, Response 
> response) {
>                         
> DOM.getElementById("container").setInnerHTML(response.getText());
>                         new LoaderModule().onModuleLoad();
>                 }
>
>                 @Override
>                 public void onError(Request request, Throwable exception) {
>                         // TODO Auto-generated method stub
>                 }
>         });
>
> try {
>                 rb.send();} catch (RequestException e) {
> }
>
> -------------------
>
> Now, if I call moduleA.onModuleLoad() things seem to work fine.  So I
> suppose I could just maintain the module list in two places (in the
> LoaderModule xml file and in the code).  But I was wondering if
> * there was a way to automatically chain the onModuleLoad methods, or,
> barring that,
> * find out what modules the module I'm currently executing has
> inherited from.
>
> I did some searching on the google web toolkit group, but didn't find
> anything that seemed applicable.
>
> Any ideas?
>
> Thanks,
> Dan

-- 
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