> <Label text="Price:" />
> <Label text="{Binding path=price}"/>
It expects the data context as an object (not a collection) with an
attribute "price".

As for TableViewer, it expects to have a collection to bind in ti "input".
In your code, the "input" specification is missing. If the data context is a
collection, you just need to indicate the input to use the data context like
this:
input="{Binding}"

If the data context of TableViewer is not a collection, you need to indicate
the collection viw path
input="{Binding path=orders}"

In general, I support you have a collection of Transaction. You want to
display the price when a transaction gets selected. It is the pure
Master/Detail presentation pattern. I suggest you llok at this example:
org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
The code is attached here. You can more examples in e4 CVS.

Sorry, somme correction of typo in my previous email
---
In general, I suppose you have a collection of Transaction. You want to
display the price when a transaction gets selected. It is a pure
Master/Detail presentation pattern. I suggest you look at this example:
org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
The code is attached here. You can find more examples in e4 CVS.
---
"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:hees2r$r1j$1@build.eclipse.org...
> Hi Walter,
>
> It is about the "data context".
>
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
> It expects the data context as an object (not a collection) with an
> attribute "price".
>
> As for TableViewer, it expects to have a collection to bind in ti "input".
> In your code, the "input" specification is missing. If the data context is
> a collection, you just need to indicate the input to use the data context
> like this:
> input="{Binding}"
>
> If the data context of TableViewer is not a collection, you need to
> indicate the collection viw path
> input="{Binding path=orders}"
>
> Regarding the table header, you need to add
> <TableViewer.table headerVisible="true">
> </TableViewer.table>
>
> By defualt, it is false.
>
> In general, I support you have a collection of Transaction. You want to
> display the price when a transaction gets selected. It is the pure
> Master/Detail presentation pattern. I suggest you llok at this example:
> org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
> The code is attached here. You can more examples in e4 CVS.
>
> Regards
> Yves YANG
> "Walter Prabhakar" <kwchess@gmail.com> wrote in message
> news:he916r$np$1@build.eclipse.org...
>> Hi,
>>
>> When using Databinding in XWT using an object ( Transaction.java ) I am
>> able to show the value of "price"
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
>>
>> However, if I need to show the price in tableviewer
>> <TableViewer>
>> <TableViewer.columns>
>> <TableViewerColumn width="150" text="Price"
>> displayMemberPath="price" />
>> </TableViewer.columns>
>> <TableViewer.control.layoutData>
>> <GridData horizontalAlignment="FILL" verticalAlignment="FILL"
>> grabExcessVerticalSpace="true"
>> grabExcessHorizontalSpace="true" />
>> </TableViewer.control.layoutData>
>> </TableViewer>
>>
>> The Data ( price ) is not rendered in the Table. Even the columns are
>> not
>> shown.
>>
>> I tried the following
>> 1) XWT.load(parent, url, ( Transaction ) ( getT [ 0 ] ) ); => Shows up
>> correctly in Label but not in Table
>> 2) XWT.load(parent, url, getT( ) ) ; => Doesnot show in Label (
>> correct
>> behaviour ? ) and does not show in Table
>> 3) XWT.load(parent, url, getTinList ( ) ) ; => Here the object passed is
>> a
>> List => similar behaviour as in 2).
>>
>> I had tried even with
>> <TableViewer input="{Binding Path=transaction}">
>>
>> Any help is much appreciated.
>>
>> Thanks,
>> Best Regards,
>> Walter G. Prahakar.
>>
>
>
>

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:hees2r$r1j$1@build.eclipse.org...
> Hi Walter,
>
> It is about the "data context".
>
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
> It expects the data context as an object (not a collection) with an
> attribute "price".
>
> As for TableViewer, it expects to have a collection to bind in ti "input".
> In your code, the "input" specification is missing. If the data context is
> a collection, you just need to indicate the input to use the data context
> like this:
> input="{Binding}"
>
> If the data context of TableViewer is not a collection, you need to
> indicate the collection viw path
> input="{Binding path=orders}"
>
> Regarding the table header, you need to add
> <TableViewer.table headerVisible="true">
> </TableViewer.table>
>
> By defualt, it is false.
>
> In general, I support you have a collection of Transaction. You want to
> display the price when a transaction gets selected. It is the pure
> Master/Detail presentation pattern. I suggest you llok at this example:
> org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
> The code is attached here. You can more examples in e4 CVS.
>
> Regards
> Yves YANG
> "Walter Prabhakar" <kwchess@gmail.com> wrote in message
> news:he916r$np$1@build.eclipse.org...
>> Hi,
>>
>> When using Databinding in XWT using an object ( Transaction.java ) I am
>> able to show the value of "price"
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
>>
>> However, if I need to show the price in tableviewer
>> <TableViewer>
>> <TableViewer.columns>
>> <TableViewerColumn width="150" text="Price"
>> displayMemberPath="price" />
>> </TableViewer.columns>
>> <TableViewer.control.layoutData>
>> <GridData horizontalAlignment="FILL" verticalAlignment="FILL"
>> grabExcessVerticalSpace="true"
>> grabExcessHorizontalSpace="true" />
>> </TableViewer.control.layoutData>
>> </TableViewer>
>>
>> The Data ( price ) is not rendered in the Table. Even the columns are
>> not
>> shown.
>>
>> I tried the following
>> 1) XWT.load(parent, url, ( Transaction ) ( getT [ 0 ] ) ); => Shows up
>> correctly in Label but not in Table
>> 2) XWT.load(parent, url, getT( ) ) ; => Doesnot show in Label (
>> correct
>> behaviour ? ) and does not show in Table
>> 3) XWT.load(parent, url, getTinList ( ) ) ; => Here the object passed is
>> a
>> List => similar behaviour as in 2).
>>
>> I had tried even with
>> <TableViewer input="{Binding Path=transaction}">
>>
>> Any help is much appreciated.
>>
>> Thanks,
>> Best Regards,
>> Walter G. Prahakar.
>>
>
>
>

> <Label text="Price:" />
> <Label text="{Binding path=price}"/>
It expects the data context as an object (not a collection) with an
attribute "price".

As for TableViewer, it expects to have a collection to bind in ti "input".
In your code, the "input" specification is missing. If the data context is a
collection, you just need to indicate the input to use the data context like
this:
input="{Binding}"

If the data context of TableViewer is not a collection, you need to indicate
the collection viw path
input="{Binding path=orders}"

In general, I support you have a collection of Transaction. You want to
display the price when a transaction gets selected. It is the pure
Master/Detail presentation pattern. I suggest you llok at this example:
org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
The code is attached here. You can more examples in e4 CVS.

Sorry, somme correction of typo in my previous email
---
In general, I suppose you have a collection of Transaction. You want to
display the price when a transaction gets selected. It is a pure
Master/Detail presentation pattern. I suggest you look at this example:
org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
The code is attached here. You can find more examples in e4 CVS.
---
"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:hees2r$r1j$1@build.eclipse.org...
> Hi Walter,
>
> It is about the "data context".
>
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
> It expects the data context as an object (not a collection) with an
> attribute "price".
>
> As for TableViewer, it expects to have a collection to bind in ti "input".
> In your code, the "input" specification is missing. If the data context is
> a collection, you just need to indicate the input to use the data context
> like this:
> input="{Binding}"
>
> If the data context of TableViewer is not a collection, you need to
> indicate the collection viw path
> input="{Binding path=orders}"
>
> Regarding the table header, you need to add
> <TableViewer.table headerVisible="true">
> </TableViewer.table>
>
> By defualt, it is false.
>
> In general, I support you have a collection of Transaction. You want to
> display the price when a transaction gets selected. It is the pure
> Master/Detail presentation pattern. I suggest you llok at this example:
> org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
> The code is attached here. You can more examples in e4 CVS.
>
> Regards
> Yves YANG
> "Walter Prabhakar" <kwchess@gmail.com> wrote in message
> news:he916r$np$1@build.eclipse.org...
>> Hi,
>>
>> When using Databinding in XWT using an object ( Transaction.java ) I am
>> able to show the value of "price"
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
>>
>> However, if I need to show the price in tableviewer
>> <TableViewer>
>> <TableViewer.columns>
>> <TableViewerColumn width="150" text="Price"
>> displayMemberPath="price" />
>> </TableViewer.columns>
>> <TableViewer.control.layoutData>
>> <GridData horizontalAlignment="FILL" verticalAlignment="FILL"
>> grabExcessVerticalSpace="true"
>> grabExcessHorizontalSpace="true" />
>> </TableViewer.control.layoutData>
>> </TableViewer>
>>
>> The Data ( price ) is not rendered in the Table. Even the columns are
>> not
>> shown.
>>
>> I tried the following
>> 1) XWT.load(parent, url, ( Transaction ) ( getT [ 0 ] ) ); => Shows up
>> correctly in Label but not in Table
>> 2) XWT.load(parent, url, getT( ) ) ; => Doesnot show in Label (
>> correct
>> behaviour ? ) and does not show in Table
>> 3) XWT.load(parent, url, getTinList ( ) ) ; => Here the object passed is
>> a
>> List => similar behaviour as in 2).
>>
>> I had tried even with
>> <TableViewer input="{Binding Path=transaction}">
>>
>> Any help is much appreciated.
>>
>> Thanks,
>> Best Regards,
>> Walter G. Prahakar.
>>
>
>
>

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:hees2r$r1j$1@build.eclipse.org...
> Hi Walter,
>
> It is about the "data context".
>
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
> It expects the data context as an object (not a collection) with an
> attribute "price".
>
> As for TableViewer, it expects to have a collection to bind in ti "input".
> In your code, the "input" specification is missing. If the data context is
> a collection, you just need to indicate the input to use the data context
> like this:
> input="{Binding}"
>
> If the data context of TableViewer is not a collection, you need to
> indicate the collection viw path
> input="{Binding path=orders}"
>
> Regarding the table header, you need to add
> <TableViewer.table headerVisible="true">
> </TableViewer.table>
>
> By defualt, it is false.
>
> In general, I support you have a collection of Transaction. You want to
> display the price when a transaction gets selected. It is the pure
> Master/Detail presentation pattern. I suggest you llok at this example:
> org.eclipse.e4.xwt.tests.jface.tableviewer.master.detail/Tab leViewer_MasterDetail.xwt:
> The code is attached here. You can more examples in e4 CVS.
>
> Regards
> Yves YANG
> "Walter Prabhakar" <kwchess@gmail.com> wrote in message
> news:he916r$np$1@build.eclipse.org...
>> Hi,
>>
>> When using Databinding in XWT using an object ( Transaction.java ) I am
>> able to show the value of "price"
>> <Label text="Price:" />
>> <Label text="{Binding path=price}"/>
>>
>> However, if I need to show the price in tableviewer
>> <TableViewer>
>> <TableViewer.columns>
>> <TableViewerColumn width="150" text="Price"
>> displayMemberPath="price" />
>> </TableViewer.columns>
>> <TableViewer.control.layoutData>
>> <GridData horizontalAlignment="FILL" verticalAlignment="FILL"
>> grabExcessVerticalSpace="true"
>> grabExcessHorizontalSpace="true" />
>> </TableViewer.control.layoutData>
>> </TableViewer>
>>
>> The Data ( price ) is not rendered in the Table. Even the columns are
>> not
>> shown.
>>
>> I tried the following
>> 1) XWT.load(parent, url, ( Transaction ) ( getT [ 0 ] ) ); => Shows up
>> correctly in Label but not in Table
>> 2) XWT.load(parent, url, getT( ) ) ; => Doesnot show in Label (
>> correct
>> behaviour ? ) and does not show in Table
>> 3) XWT.load(parent, url, getTinList ( ) ) ; => Here the object passed is
>> a
>> List => similar behaviour as in 2).
>>
>> I had tried even with
>> <TableViewer input="{Binding Path=transaction}">
>>
>> Any help is much appreciated.
>>
>> Thanks,
>> Best Regards,
>> Walter G. Prahakar.
>>
>
>
>