PDA

View Full Version : PagingToolbar - buttons do not disable



paco_online
30 Mar 2009, 12:51 AM
hi,

i have a PagingGrid (like in the Explorer demo) with a paging size of 25. The data is shown, and all seems to be fine.

But the Buttons first, prev are not disabled at start and i am also able to page over the max. page numbers. The buttons do not disable! If i debug into the PagingToolbar Class i can see the the first.setEnabled(...); with false is called and the style (disabledStyle) is set. But this seems to have no effect :-(

here goes my code ... i found no difference to the example




ContentPanel gridPanel = new ContentPanel();
gridPanel.setLayout(new FitLayout());
gridPanel.setHeaderVisible(false);
gridPanel.setBorders(false);
gridPanel.setBodyBorder(false);
.
.
.
final MockServiceAsync service = MockService.Util.getInstance();

RpcProxy proxy = new RpcProxy() {
@Override
public void load(Object loadConfig, AsyncCallback callback) {
service.getMockList((PagingLoadConfig) loadConfig, "dummy_search_string", callback);
}
};

BasePagingLoader loader = new BasePagingLoader(proxy);
loader.setRemoteSort(true);
loader.load(0, 25);

ListStore store = new ListStore(loader);

final PagingToolBar toolBar = new PagingToolBar(25);
toolBar.bind(loader);
gridPanel.setBottomComponent(toolBar);

final Grid grid = new Grid(store, cm);
grid.getView().setAutoFill(true);
grid.setBorders(false);

gridPanel.add(grid);



thx
paco