The solution was to modify the DefaultHistorian by overriding 
addValueChangeHanlder. I was then able to inspect the value change event 
before passing it along to the PlaceHistoryHandler.
PlaceHistoryHandler historyHandler=new PlaceHistoryHandler(
getPlaceHistoryMapper(),getHistorian());

public Historian getHistorian() {
return new PlaceHistoryHandler.DefaultHistorian(){ 
@Override
public HandlerRegistration addValueChangeHandler(final 
ValueChangeHandler<String> valueChangeHandler) {
//The PlaceHistoryHandler will be adding this ValueChangeHandler. Override 
and inspect the ValueChangeEvent before alerting the PlaceHistoryHandler 
that there has been a change.
return super.addValueChangeHandler(new ValueChangeHandler<String>() { 
@Override
public void onValueChange(ValueChangeEvent<String> event) {
if(event.getValue().toLowerCase().equals("toc")  //Ignore table of contents 
navigation event.
|| event.getValue().indexOf(WcagHelper.HYPERLINK_PREFIX)>=0){  //Ignore 
specially marked hyperlinks.
return;
}
//We made it this far so it is safe to pass the navigation event along.
valueChangeHandler.onValueChange(event); 
}
});
}
};
}

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

Reply via email to