summaryrefslogtreecommitdiffstats
blob: d12806d5e0e1692bdf3d4ae1503057238c339926 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<Composite xmlns="http://www.eclipse.org/xwt/presentation"
    xmlns:x="http://www.eclipse.org/xwt"
    xmlns:j="clr-namespace:org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail.list"
    DataContext="{StaticResource myCompany}">
	<Composite.layout>
		<GridLayout numColumns="1"/>
	</Composite.layout>
	<Composite.Resources>
		<j:Company x:Key="myCompany">
			<j:Company.employees>
				<j:Employee Name="Thomas" Age="32"/>
				<j:Employee Name="Jin" Age="27"/>
			</j:Company.employees>
		</j:Company>
	</Composite.Resources>
	<TableViewer Name="TableViewer" input="{Binding Path=employees}">
		<TableViewer.columns>
			<TableViewerColumn width="150" text="Name" bindingPath="name"/>
			<TableViewerColumn width="150" text="Age" bindingPath="age"/>
		</TableViewer.columns>
		<TableViewer.table HeaderVisible="true">
		</TableViewer.table>
		<TableViewer.control.layoutData>
			<GridData horizontalAlignment="FILL"
         		grabExcessHorizontalSpace="true"/>
		</TableViewer.control.layoutData>
	</TableViewer>
	<Text name="Text" text="{Binding ElementName=TableViewer,path=singleSelection.(j:Employee.name),UpdateSourceTrigger=PropertyChanged}">
		<Text.layoutData>
			<GridData horizontalAlignment="FILL"
         		grabExcessHorizontalSpace="true"/>
		</Text.layoutData>
	</Text>
</Composite>