/** * *********************************************************** Create * *********************************************************** */ @SuppressWarnings("rawtypes") private void onNodeTypeChanged() { ListModelList typeModel = (ListModelList) typeBox.getModel(); Set selections = typeModel.getSelection(); if (selections.isEmpty()) return; String selection = (String) selections.iterator().next(); logger.info("Node type set to: " + selection); Map<String, String> ntd = GeneralUtil.getNodeDescriptionByLabel(ntds, selection); String nodeType = ntd.get("type"); if (nodeType.equals(Constants.NODE_TYPE_USER)) { firstNameRow.setVisible(true); firstNameBox.setConstraint("no empty"); lastNameRow.setVisible(true); lastNameBox.setConstraint("no empty"); midNameRow.setVisible(true); } else { firstNameRow.setVisible(false); firstNameBox.setConstraint(""); lastNameRow.setVisible(false); lastNameBox.setConstraint(""); midNameRow.setVisible(false); } }