// .createSelectionElement(Classification.class,//getConversationHolder(),
// formElement, "Classification",
// null, EntitySelectionElement.DELETABLE, style);
+
selection_parentTaxonNode = formFactory
.createTaxonNodeSelectionElement(getConversationHolder(), formElement, "Parent", parentTreeNode,
EntitySelectionElement.DELETABLE, style);
+
+
+ selection_Ref = formFactory
+ .createSelectionElement(Reference.class,
+ formElement, "Parent Child Relation Source", null,
+ EntitySelectionElement.DELETABLE, style);
+
+
+ microReference = formFactory.createTextWithLabelElement(formElement,"Detail", "", style);
+ microReference.setText(getEntity().getMicroReference());
+
selection_reuseExistingTaxon = formFactory
.createSelectionElement(Taxon.class,//getConversationHolder(),
formElement,
}
}else{
- TextWithLabelElement textClassification = formFactory.createTextWithLabelElement(formElement,"Classification", entity.getClassification().getTitleCache(), style);
- textClassification.setEnabled(false);
-
+ if (entity.getParent().getTaxon() == null){
+ TextWithLabelElement textParent = formFactory.createTextWithLabelElement(formElement,"Classification", entity.getClassification().getTitleCache(), style);
+ textParent.setEnabled(false);
+ }else{
+ TextWithLabelElement textParent = formFactory.createTextWithLabelElement(formElement,"Parent", entity.getParent().getTaxon().getTitleCache(), style);
+ textParent.setEnabled(false);
+ }
// TextWithLabelElement textTaxon = formFactory.createTextWithLabelElement(formElement,"Taxon", taxon.getTitleCache(), style);
// textTaxon.setEnabled(false);
}
- selection_Ref = formFactory
- .createSelectionElement(Reference.class,//getConversationHolder(),
- formElement, "Parent Child Relation Source", null,
- EntitySelectionElement.DELETABLE, style);
- microReference = formFactory.createTextWithLabelElement(formElement,"Detail", "", style);
- microReference.setText(getEntity().getMicroReference());
+
if (!isCreateNew()){
- selection_Ref.setEntity(entity.getReference());
+ if (entity.getReference() != null){
+ selection_Ref.setEntity(entity.getReference());
+ }
}
parentTreeNode = entity.getParent();
selectionNodeAgentRelation.setEntity(entity);
selectionNodeAgentRelation.setLayoutData(LayoutConstants.FILL_HORIZONTALLY(2, 1));
}
-// checkbox_openInEditor = formFactory.createCheckbox(formElement,
-// "Open in Editor", true, style);
-// setOpenInEditor(true);
+
}
private void preFillTaxonName() {
}
checkbox_publish.setSelected(getTaxon().isPublish());
}
+ boolean enabled = selection_reuseExistingTaxon.getEntity() == null;
+ if (selection_reuseExistingName != null){
+ selection_reuseExistingName.setEnabled(enabled);
+ }
+ textNewTaxonName.setEnabled(enabled);
complete = true;
} else if (eventSource == selection_reuseExistingName) {
boolean enabled = selection_reuseExistingName.getEntity() == null;
return classification;
}
-// public boolean isOpenInEditor() {
-// return openInEditor;
-// }
+
public ITaxonTreeNode getParentTreeNode() {
return parentTreeNode;