Hi. Here's my history value change event handler:
public void onValueChange(ValueChangeEvent<String> event) {
String token = event.getValue();
if (token != null) {
if (token.equals("!list")) {
GWT.runAsync(new RunAsyncCallback() {
public void onFailure(Throwable caught) {
}
public void onSuccess() {
presenter = new ContactsPresenter(rpcService, eventBus, new ContactsView());
presenter.go(container);
}
});
}
else if (token.equals("!add")) {
GWT.runAsync(new RunAsyncCallback() {
public void onFailure(Throwable caught) {
}
public void onSuccess() {
presenter = new EditContactPresenter(rpcService, eventBus, new EditContactView());
presenter.go(container);
}
});
}
else if (token.equals("!edit")) {
GWT.runAsync(new RunAsyncCallback() {
public void onFailure(Throwable caught) {
}
public void onSuccess() {
presenter = new EditContactPresenter(rpcService, eventBus, new EditContactView());
presenter.go(container);
}
});
}
}
As you can see, going to www.domain.com/#edit loads up the edit view. But, how would I specify a parameter in the fragment, e.g. an id, and pass it on to the Edit Contacts Presenter?
www.domain.com/#edit/1