/* fills ui with the selected resource's values */ private void populateGUI(NonHumanResource resource, String id) { // selected resource is null after a selection change if (resource == null) { resource = _orgDataSet.getNonHumanResource(id); updateSelectedResource(resource); } if (resource != null) { populateSimpleFields(resource); NonHumanCategory category = resource.getCategory(); String subCatName = resource.getSubCategoryName(); if (category == null) { category = getFirstListedCategory(); // default } if (subCatName == null) subCatName = "None"; if (category != null) { cbbCategory.setSelected(category.getID()); _sb.setNhResourcesSubcategoryItems(getSubCategoryList(category)); cbbSubCategory.setSelected(subCatName); } else _sb.setNhResourcesSubcategoryItems(null); // no categories defined } _sb.setNhResourcesSubcategoryList(null); // empty the category tab list box }
protected void clearCombos() { cbbCategory.setSelected(null); cbbSubCategory.setSelected(null); cbbCategory.setItems(null); cbbSubCategory.setItems(null); }