Is it possible to display multiple columns within a slush bucket ?
Like SqlSchemaEditor FK example, i'm trying to add an index master detail node.
An index has a name property and an indexcolumn list :
@Image(path = "index.gif")
public interface Index extends Element {
ElementType TYPE = new ElementType(Index.class);
// *** Name ***
@Label(standard = "index name")
@Required
@org.eclipse.sapphire.Unique
@XmlBinding(path = "@name")
ValueProperty PROP_NAME = new ValueProperty(TYPE, "Name");
Value<String> getName();
void setName(String name);
// *** Columns ***
@Type(base = IndexColumn.class)
@XmlListBinding(mappings = @XmlListBinding.Mapping(element = "index-column", type = IndexColumn.class))
@Length(min = 1, max = 32)
@Service(impl = IndexValidationService.class)
@Service(impl = IndexColumnNamePossibleValuesService.class)
ListProperty PROP_INDEX_COLUMNS = new ListProperty(TYPE, "IndexColumns");
ElementList<IndexColumn> getIndexColumns();
}
An IndexColumn wraps a reference to an existing table column :
@Image(path = "Column.png")
public interface IndexColumn
extends Element {
ElementType TYPE = new ElementType(IndexColumn.class);
// *** Referenced column ***
@Reference(target = Column.class)
@ElementReference(list = "../../Columns", key = "Name")
@Required
@MustExist
@Unique
@XmlBinding(path = "@nameAttribute")
@Service(impl = ColumnValueLabelService.class)
ValueProperty PROP_COLUMN = new ValueProperty(TYPE, "Column");
ReferenceValue<String, Column> getColumn();
void setColumn(String value);
void setColumn(Column value);
}
In a detail section I would like to display two properties of the referenced column in a slush bucket (column name + description).
E.g. :
| Name |Description| | Name |Description|
|--------------|-----------| |-----------|-----------|
|col1 | desc1 | | | |
|col2 | desc2 | ---> | | |
|col3 | desc3 | | | |
Given the nested properties example, I tried -without success- to access directly to the referenced columns properties :
<detail-section>
<case>
<content>
<property-editor>
<show-label>false</show-label>
<property>IndexColumns</property>
<span>false</span>
<scale-vertically>true</scale-vertically>
<child-property>Column/Name</child-property>
<child-property>Column/Description</child-property>
</property-editor>
</content>
</case>
<property>Indexes</property>
<scale-vertically>true</scale-vertically>
</detail-section>
PS : Referencing the column property displays the table's name.
<detail-section>
<case>
<content>
<property-editor>
<show-label>false</show-label>
<property>IndexColumns</property>
<span>false</span>
<scale-vertically>true</scale-vertically>
<child-property>Column</child-property>
</property-editor>
</content>
</case>
<property>Indexes</property>
<scale-vertically>true</scale-vertically>
</detail-section>
[Updated on: Wed, 27 April 2016 05:20] by Moderator