Yes.  For one, a hacky way would be to have each application register itself
in the onModuleLoad.

i.e.

package foo;

class ApplicationA
{

private native void register() /*--
{
   $wnd.applications.push([email protected]::load()());
}--*/;

private native void load()
{
   // the function is loaded
}

private void onModuleLoad()
{
    register();
}

}

rinse & repeat for the other applications.

Then simply include them in the HTML as you would with your main app.  The
downside, is that all of them get loaded at once on startup.

However, the more proper way would be to bundle the other applications as
proper GWT modules & have your main one inherit from them.  Then supply
programmatic entry points into the applications via a custom interface, ie

public interface DynamicLoad
{
   void onApplicationSelected(SimplePanel parent);
}

The downside to either approach is that you need to load all your
applications at once.  Trunk has runAsync which solves this problem but it
would be far easier to integrate with the second approach.

On Fri, May 8, 2009 at 8:07 AM, M V <[email protected]> wrote:

> Hi All,
>
> Is it possible to load a gwt application directly from code???
>
> What I want is to provide a list of applications available in a drop down
> and without reloading the page to load the gwt application selected into a
> div. I checked a using lazy panels but I have to have the widget I want in
> the gwt application itself. What I want is something like the javascript
> native function *eval(string) *but for a entire gwt application (module).
>
> Thanks in advance...
>
> MV
>
> >
>

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