yourListBox.setModel(new ListModelList<BeanClass>(beanDao.findAll())); yourListBox.setItemRenderer(new ListItemRenderer<BeanClass>) { @Override public void render(Listitem item, BeanClass data, int index) throws Exception { Listcell cell = new Listcell(); cell.appendChild(new Label(data.getFoo())); item.appendChild(cell); } });
private Listcell addCell(Listitem item, Object object) { Listcell cell = new Listcell(object.toString()); cell.setTooltiptext(object.toString()); item.appendChild(cell); return cell; }
private Listcell autoFirstCell() { Listcell cell = (Listcell) getFirstChild(); if (cell == null) { cell = new Listcell(); cell.applyProperties(); cell.setParent(this); } return cell; } }
private Listcell autoFirstCell() { Listcell cell = (Listcell) getFirstChild(); if (cell == null) { cell = new Listcell(); cell.applyProperties(); cell.setParent(this); } return cell; }
private Listcell newUnloadedCell(ListitemRenderer renderer, Listitem item) { Listcell cell = null; if (renderer instanceof ListitemRendererExt) cell = ((ListitemRendererExt) renderer).newListcell(item); if (cell == null) { cell = new Listcell(); cell.applyProperties(); } cell.setParent(item); return cell; }
Listcell c = new Listcell(); Html h = new Html(); h.setContent("MY HTML STRING HERE"); c.appendChild(h); listitem.appendChild(c);
private Listcell getCell(int col, int row) { Listitem item; while (row >= lstVitals.getItemCount()) { item = new Listitem(); item.setVisible(false); item.setParent(lstVitals); } item = lstVitals.getItemAtIndex(row); while (col >= item.getChildren().size()) { Listcell cell = new Listcell(""); cell.setParent(item); } return (Listcell) item.getChildren().get(col); }
new Listcell(t).setParent(item);
j_domain.appendChild(li); IdentifierDt abbr = FhirUtil.getIdentifier(organization.getIdentifier(), "ABBREVIATION"); li.appendChild(new Listcell(abbr == null ? organization.getName().getValue() : abbr.getValue().getValue()));
li.setValue(securityDomain); lstDomain.appendChild(li); li.appendChild(new Listcell(securityDomain.getName()));
/** * Render the list item for the specified document. * * @param item List item to render. * @param doc The document associated with the list item. */ @Override public void renderItem(final Listitem item, final Document doc) { final Listcell cell = new Listcell(); item.appendChild(cell); final Div sep = new Div(); sep.setSclass("vista-documents-sep"); cell.appendChild(sep); final Div div = new Div(); div.setSclass(Constants.SCLASS_TEXT_REPORT_TITLE); cell.appendChild(div); final Hbox boxHeader = new Hbox(); final Label header = new Label(doc.getTitle()); header.setZclass(Constants.SCLASS_TEXT_REPORT_TITLE); boxHeader.appendChild(header); div.appendChild(boxHeader); Label body = new Label(doc.getBody()); body.setMultiline(true); body.setPre(true); cell.appendChild(body); }