{
if (endIndex + 1 < total)
{
startIndex += pageSize;
endIndex += pageSize;
Session.getInstance().getEventBus().notifyObservers(new PagerUpdatedEvent(thisBuffered));
HashMap<String, String> params = new HashMap<String, String>();
params.put(URL_PARAM_START_INDEX, startIndex.toString());
params.put(URL_PARAM_END_INDEX, endIndex.toString());
Session.getInstance().getEventBus().notifyObservers(
new UpdateHistoryEvent(new CreateUrlRequest(params, false)));
}
}
});
this.add(prev);
prev.addStyleName(StaticResourceBundle.INSTANCE.coreCss().pagerBackward());
prev.addClickHandler(new ClickHandler()
{
public void onClick(final ClickEvent event)
{
if (startIndex - pageSize >= 0)
{
startIndex -= pageSize;
endIndex -= pageSize;
Session.getInstance().getEventBus().notifyObservers(new PagerUpdatedEvent(thisBuffered));
HashMap<String, String> params = new HashMap<String, String>();
params.put(URL_PARAM_START_INDEX, startIndex.toString());
params.put(URL_PARAM_END_INDEX, endIndex.toString());