@Override protected void setReferenceDataModel(ReferenceDataModel refDataModel, PackageLine entity) { super.setReferenceDataModel(refDataModel, entity); DetachedCriteria dc = daoHelper.getDao(Item.class).getCriteria(); dc.add(Restrictions.eq("product", entity.getProduct())); refDataModel.putRefDataList(REF_ITEMS, daoHelper.getDao(Item.class).findByCriteria(dc)); }
@Override protected void setReferenceDataModel(ReferenceDataModel refDataModel, DetailExportStore entity) { super.setReferenceDataModel(refDataModel, entity); // TODO: Hoang handle after user selects product refDataModel.putRefDataList(REF_ITEM_LIST, getDaoHelper().getDao(Item.class).findAll(), null); // TODO:Hoang should get from ContextProvider UnitOfMeasure baseUom = serviceProvider.getService(IConfigService.class).getBaseUnitUom(); refDataModel.putRefDataList(REF_BASE_UOM_LIST, Arrays.asList(baseUom), null); }