PDA

View Full Version : Hyperlink and ValueChangeHandler doesn't work in Hosted Mode.



John99
1 Sep 2009, 12:20 PM
Hello. Sorry for my english)

I have a link to user page on user list grid:



...
final Hyperlink link = new Hyperlink(value, "toUser");
...


and the main module class:


public class Gwms implements EntryPoint,ValueChangeHandler{

private NavTree model;
private Dispatcher dispatcher;
public static final Icons IMAGES = GWT.create(Icons.class);

public void onModuleLoad() {

History.addValueChangeHandler(this);

....

}

public static void showPage(Entry entry) {
AppEvent appEvent = new AppEvent(AppEvents.ShowPage, entry);
appEvent.setHistoryEvent(true);
appEvent.setToken(entry.getId());
Dispatcher.forwardEvent(appEvent);
}

@Override
public void onValueChange(ValueChangeEvent event) {

ContentPanel center = (ContentPanel) Registry.get(Constants.CENTER_PANEL);
center.removeAll();
center.setHeading("ewrwerewrwe");
center.add(new UserPage());

Viewport v = Registry.get(Constants.VIEWPORT);
v.layout(true);

}


}

as i understand
when i click the link onValueChange method should be invoked and user page should display.
But it's only work in Chrome and Mozilla. In hosted mode and IE browser just reloads the page after the link was clicked.

coebs
1 Sep 2009, 8:39 PM
Hi,

I have a similar problem as John described above. When I submit a form by calling formPanel.submit() to a server side cgi, I canot get the result as expected under GWT hosted mode and in IE (v 8.0.6), but getting the expected result in FireFox.

Any clues? Thanks in advance ...