I want to disable back and forward button for which I followed
HistoryAjaxBehavior example
final AjaxLink<Void> linkTwo = new AjaxLink<Void>("linkTwo") {
private static final long serialVersionUID = 1L;
@Override
public void onClick(final AjaxRequestTarget target) {
info("Link two has been clicked");
target.addChildren(getPage(), FeedbackPanel.class);
historyAjaxBehavior.registerAjaxEvent(target, this);
}
};
here one component is registered to historyAjaxBehavior , on click of back
button, onAjaxHistoryEvent from HistoryAjaxBehavior gets called ,
but my case I donot have any link component , I have a page with a datatable
and when user navigates away from this page and clicks back button to
return to this page, in this case because I did not register any component,
so the method onAjaxHistoryEvent will not be called so please tell me
how to have historyAjaxBehavior to a page ?