public boolean isMultiple() { return listModel.isMultiple(); }
public void setMultiple(boolean multiple) { listModel.setMultiple(multiple); }
/** * The list model has been updated. If the model is empty or null, displays the no data message. * This ultimately calls the abstract setModel method to allow the subclass to handle the * updated model. * * @param model The hybrid model. */ private void updateModel(HybridModel<M, ?> model) { if (model == null || model.isEmpty()) { String msg = getLabel(Constants.LABEL_ID_NO_DATA); log.trace(msg); showMessage(msg); } else { showMessage(null); } if (model.isGrouped()) { setGroupsModel(model); } else { setListModel(model); } if (isPaging) { meshElement.setActivePage(0); } }
/** * Submits a data fetch request in the background. */ @Override protected void fetchData() { listModel.clear(); super.fetchData(); }
/** * Create the controller. * * @param service The is the data query service. * @param labelPrefix Prefix used to resolve label id's with placeholders. * @param propertyPrefix Prefix for property names. * @param printStyleSheet Optional style sheet to apply when printing. * @param patientAware If true, uses patient context. * @param autowireColumns If true, columns are auto-wired with sort comparators. * @param grouper The grouper implementation, or null if the data is not grouped. */ @SuppressWarnings("unchecked") public AbstractMeshController(IQueryService<T> service, String labelPrefix, String propertyPrefix, String printStyleSheet, boolean patientAware, boolean autowireColumns, IGrouper<M, ?> grouper) { super(service, patientAware, labelPrefix); this.propertyPrefix = propertyPrefix; this.autowireColumns = autowireColumns; if (printStyleSheet != null && !printStyleSheet.startsWith("~./")) { printStyleSheet = ZKUtil.getResourcePath(getClass()) + printStyleSheet; } this.printStyleSheet = printStyleSheet; this.grouper = grouper; this.listModel = new HybridModel<M, Object>((IGrouper<M, Object>) grouper); }