Luis' suggestion offered a clue to what is going on here and I have
managed to figure out what the problem is. The StockWatcher
application is expanded in the example to include a Google Accounts
login (i.e. LoginService). What this does is that when the module is
loaded it checks to see if the users has already logged in. If not it
refers them to the Google Accounts login and in development mode this
is simulated. When you pass the page for the URL which the accounts
login page should return to and it doesn't include the gwt_codesvr=...
reference you loose the ability to debug the application and make
changes on the fly after login. This is why I would have to constantly
recompile the app. When it returned from the login page without the
gwt_codesvr reference it was picking up the app form the war directory
which would have been stale.
I suspect Google needs to update the documentation for the
StockWatcher example. What I had to do is append
"gwt.codesvr=localhost:9997" to the login and logout URLs. See below
private void loadLogin() {
// Assemble login panel.
signInLink.setHref(loginInfo.getLoginUrl() + "?gwt.codesvr=localhost:
9997");
loginPanel.add(loginLabel);
loginPanel.add(signInLink);
RootPanel.get().add(loginPanel);
}
and
signOutLink.setHref(loginInfo.getLogoutUrl() + "?
gwt.codesvr=localhost:9997");
One needs to be careful hard coding these values though as they may
change if the browser is running on a machine tht is different than
where the development server is running or if using a different port
number.
Not sure if this is the best way to address this and if others have a
better suggestion I would appreciate it. I would consider this a
workaround at this point. Thanks Luis.