the onValueChange is my menu handler which works fine for the links in the menu panel
On page1 I have a celltable with links to page2, if I click on a link (<a href='?dep=Sales#page2'>Sales</a>) it does go to page2, but the page fully reloads and the Vertical Menu Panel is in initial state, not on the 2nd group When looking for examples I saw that I had to put ?dep=Sales before the history token, is that not correct? Should I have <a href='#page2?dep=Sales'>Sales</a> instead? Or will that break access from IE browsers? On Dec 7, 1:03 am, David <[email protected]> wrote: > "I also pass a parameter in the string with href='?dep=blah#page2') " > if any portion of the url prior to the # changes then app will reload > (come through onModuleLoad() again. > > I'm not sure if that is what you are doing as I don't see the menu > event handling in your sample > > On Dec 5, 8:06 pm, JavaCool4Me <[email protected]> wrote: > > > > > > > > > Hi, > > I am building a new application with a vertical panel menu, which > > works fine, > > but within some pages I have links to other pages ( which is a history > > token), > > but I need the vertical panel to slide to the correct group. > > The links in the page work fine now, but the panel does not slide. > > When I click a link from i.e. page1 to page2, the whole page reloads, > > but the content is correct > > (I also pass a parameter in the string with href='?dep=blah#page2') > > > I am not sure about the usage of History and fireCurrentHistory, but > > without that the inter page links don't seem to work > > > -- > > public class GwtTest implements EntryPoint, ValueChangeHandler<String> > > { > > MenuBuilder mb; > > public void onModuleLoad() { > > mb = new MenuBuilder(); > > mb.buildMenuFromXml("Test"); > > hp = new HTMLPanel("<div id='printWidget'></div><div > > id='dateWidget'></div><div id='reportWidget'></div>"); > > RootPanel.get("appPanel").add(hp); > > DoHomePage.render(hp); > > History.addValueChangeHandler(this); > > if(History.getToken().isEmpty()) { > > History.newItem("home"); > > > } > > History.fireCurrentHistoryState(); > > mb.setMenuPanelActive(History.getToken()); > > } > > > public void onValueChange(ValueChangeEvent event) { > > if(History.getToken().equals("home")) { > > hp.clear(); > > DoHomePage.render(hp); > > mb.setMenuPanelActive(History.getToken()); > > }else if(History.getToken().equals("page1")) { > > hp.clear(); > > DoPage1.render(hp); > > mb.setMenuPanelActive(History.getToken()); > > }else if(History.getToken().equals("page2")) { > > hp.clear(); > > DoPage2.render(hp); > > mb.setMenuPanelActive(History.getToken()); > > } > > > } > > > } -- 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.
