@Override public void go(JPanel menuLeft) { menuLeft.removeAll(); menuLeft.add(display.getPanel()); menuLeft.revalidate(); menuLeft.repaint(); }
private void fetchOrderCategories() { Label loading = new Label("Loading orders ..."); display.getPanel().add(loading); rpcService.getOrderCategories( MainPresenter.uploadID, new AsyncCallback<ArrayList<OrderCategory>>() { @Override public void onSuccess(ArrayList<OrderCategory> result) { display.getPanel().clear(); for (OrderCategory category : result) { new SingleOrderSetPresenter( new SingleOrderSetView(category), rpcService, globalEventBus) .go(display.getPanel()); } } @Override public void onFailure(Throwable caught) { Window.alert( "Server Error: failed to get order categories. \n\n" + caught.getMessage()); } }); }