Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sapphire » Multiple columns in slush bucket
Multiple columns in slush bucket [message #1730486] Tue, 26 April 2016 09:29
David Fasani is currently offline David FasaniFriend
Messages: 1
Registered: April 2016
Junior Member
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 09:20]

Report message to a moderator

Previous Topic:styling with css
Next Topic:Announcing Sapphire 9.0.5 and 8.2.5 Releases
Goto Forum:
  


Current Time: Fri Sep 21 21:34:07 GMT 2018

Powered by FUDForum. Page generated in 0.01566 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top