Below are some details:
/**
* This is the entry point method.
*/
public void onModuleLoad() {
Window.alert("onModuleLoad...");
// Add history listener
History.addValueChangeHandler(this);
pubLinks.show();
//load index on start...
getPage("index", constants);
}//end of onModuleLoad
public void setPage(String page, CerradoConstants constants){
System.out.println("PAGE: "+ page);
History.newItem(page);
History.fireCurrentHistoryState();
}//end setPage
@Override
public void onValueChange(ValueChangeEvent event) {
oldToken = History.getToken();
Window.alert("ValueChangeEvent-The current event value
is: " + event.getValue()+ " - Hist token is "+oldToken);
String historyToken = event.getValue().toString();
if (historyToken.contains("Account")){
accountPage.show();
}else if (historyToken.contains("Login")){
loginPage.show();
}else if (historyToken.contains("Logout")){
controller.getData().setUser(null);
contPage.setPage("index");
contPage.show();
}else {
contPage.setPage(historyToken);
contPage.show();
}
}
public void show(){
RootPanel.get("content").clear();
RootPanel.get("content").add(loginPanel);
Cerrado.getInstance().getTopLinks().show();
}
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
On Dec 24, 12:32 am, compuroad <[email protected]> wrote:
> I thought History.newItem() would only build the history stack.
> However in my App it fires the EntryPoint onModuleLoad, restarting the
> application.
>
> What am I missing?
--
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.