private void initWidget() { bc = new Breadcrumbs(); add(bc); setWidth("100%"); bc.setWidth("100%"); }
private void populateCrumb(String currPersId) { bc.clear(); bc.add(new Label(LabelType.INFO, "Perspectives")); for (final String persId : PerspectiveFactory.get().getRegisteredPerspectiveIds()) { Widget link = new AnchorListItem(persId); if (currPersId.equals(persId)) { link = new Label(LabelType.DEFAULT, persId); } else { ((AnchorListItem) link) .addClickHandler( new ClickHandler() { @Override public void onClick(ClickEvent event) { TenbleWebAppClient.pushPerspective(persId); } }); } bc.add(link); } bc.add(new AnchorListItem("")); }