I have some specific problems with the framework, is there any other GWT
framework that allows multipage function, like gwt-multipage? It can map
EntryPoints and load it based on the html request.
Like: mysite.com/index.html or mysite.com/somethingelse.html will load
two separate entry ponts for each.
Problem with gwt-multipage is that if the access is coming from
mysite.com/ (without specifying the html to load) it breaks and
sometimes loads random entry points if I am not mistaken.
Any ideas?
Yes, that's what I did. Using url rewrite filter.
This is a post re gwt-multipage:
-> http://uptick.com.au/content/managing-multiple-host-pages
You could also use an EntryPoint dispatcher:
->
...
public class EntryPointDispatcher implements EntryPoint {
public void onModuleLoad() {
try {
// get the Host Page name
Dictionary dictionary = Dictionary.getDictionary("Pages");
String page = dictionary.get("page");
Log.debug("Page name token: " + page);
if (page.equals(NameTokens.mainPage)) {
MultiPageEntryPoint entrypoint = (MultiPageEntryPoint)
GWT.create(Serendipity.class);
entrypoint.onModuleLoad();
}
else if (page.equals(NameTokens.accountPage)) {
MultiPageEntryPoint entrypoint = (MultiPageEntryPoint)
GWT.create(AccountEntryPoint.class);
entrypoint.onModuleLoad();
}
else if (page.equals(NameTokens.emailPage)) {
MultiPageEntryPoint entrypoint = (MultiPageEntryPoint)
GWT.create(EmailEntryPoint.class);
entrypoint.onModuleLoad();
}
else if (page.equals(NameTokens.fileUploadPage)) {
MultiPageEntryPoint entrypoint = (MultiPageEntryPoint)
GWT.create(FileUploadEntryPoint.class);
entrypoint.onModuleLoad();
}
} catch (Exception e) {
Log.error("e: " + e);
e.printStackTrace();
Window.alert(e.getLocalizedMessage());
}
}
}
->
Your host file:
->
...
<!-- You can use this to pass start-up information to your GWT
module -->
<script language="javascript">
var Pages = {
page: "MainPage"
};
</script>
...
->
It works for me:
-> http://gwt-cx.com/serendipity/Serendipity.html
Cheers
Rob
http://code.google.com/p/gwt-cx/
On Dec 10, 11:20 pm, Xybrek <xyb...@gmail.com> wrote:
> On 12/10/2011 4:09 AM, Jens wrote:
>
>
>
>
>
>
>
>
>
> > A first simple solution would be to configure your web server to
> > redirect requests fromhttp://mysite.com/tohttp://mysite.com/index.html.
I've been using GWT multipage and it worked out great for me.
You can add in web.xml the welcome file you want (index.html) and set
your default EntryPoint to listen to mysite.com/ .
This may help you : https://groups.google.com/forum/#!topic/gwt-multipage/36R7lV6kPj0
On Dec 9, 9:55 pm, Xybrek <xyb...@gmail.com> wrote:
> Hi, anyone here knowshttp://code.google.com/p/gwt-multipage/?