use of org.eclipse.scout.rt.client.ui.form.fields.composer.internal.ComposerAttributeForm in project scout.rt by eclipse.
the class AbstractAddAttributeMenu method execAction.
@Override
protected void execAction() {
ComposerAttributeForm form = new ComposerAttributeForm();
EntityNode eNode = null;
ITreeNode n = m_parentNode;
while (n != null) {
if (n instanceof EntityNode) {
eNode = (EntityNode) n;
break;
}
n = n.getParentNode();
}
if (eNode != null) {
form.setAvailableAttributes(eNode.getEntity().getAttributes());
} else {
form.setAvailableAttributes(m_field.getAttributes());
}
form.startNew();
form.waitFor();
if (form.isFormStored()) {
IDataModelAttribute a = form.getSelectedAttribute();
IDataModelAttributeOp op = form.getSelectedOp();
List<Object> values = form.getSelectedValues();
List<String> displayValues = form.getSelectedDisplayValues();
m_field.addAttributeNode(m_parentNode, a, null, op, values, displayValues);
}
}
Aggregations