Wednesday, June 30, 2010

Re: More than one module

This is just a suggestion off the top of my head and may or may not
work as i think it will.

To address your case I would setup 1 Module for the entry point and
use it to choose which of the other Module's to load for the main
page. I think this should allow you to take the most advantage of code
splitting so as not to load any of the data for one page when the
other is chosen.

Something like...
// PageChooserEntryPoint.onModuleLoad()

if(loadPageOne) {
GWT.runAsync(new AsyncCallback() {
(new PageOneEntryPoint).onModuleLoad();
});
} else {
GWT.runAsync(new AsyncCallback() {
(new PageTwoEntryPoint).onModuleLoad();
});
}

Im not sure if thats the best way to go about it, but its the first
thing that came to mind.

On Wed, Jun 30, 2010 at 7:25 AM, Katharina Probst <kprobst@google.com> wrote:
> See some documentation here:
> http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModules
>
> On Tue, Jun 29, 2010 at 11:59 PM, Michael W <mwang_2008@yahoo.com> wrote:
>>
>> Yes, you can have more than one module.
>> If you use Maven, you can view gwt maven plugin for detail.
>>
>> On Jun 25, 5:27 pm, GWT_AL <asaf.la...@gmail.com> wrote:
>> > I need to developer a web application which has more than one main
>> > page layout.
>> > I was wondering how to develop more than one main page in a GWT
>> > application.
>> > Is it possible to have more than one Module in a GWT app (is that the
>> > way to achieve this)?
>>
>> --
>> 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-web-toolkit@googlegroups.com.
>> To unsubscribe from this group, send email to
>> google-web-toolkit+unsubscribe@googlegroups.com.
>> 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 google-web-toolkit@googlegroups.com.
> To unsubscribe from this group, send email to
> google-web-toolkit+unsubscribe@googlegroups.com.
> 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 google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

No comments:

Post a Comment