Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » XWT + TableViewer + Master/Details
XWT + TableViewer + Master/Details [message #503369] Sat, 12 December 2009 12:45 Go to next message
Walter Mising name is currently offline Walter Mising nameFriend
Messages: 128
Registered: July 2009
Senior Member
Facing issues in showing nested Table Contents

Master Shows the Data Correctly ( contains 2 rows )
<TableViewer x:Name="testTV" x:style="BORDER|SINGLE|FULL_SELECTION"
input="{Binding}">

But in the nested table where the pictures ( a data member of master table )
is an collection of Picture objects containing url as a member, I couldn't
see the data populated in ImageViewer.
<TableViewer x:Name="ImageViewer" input="{Binding
elementName=testTV,path=selection(pictures)}">
<TableViewer.columns>
<TableViewerColumn width="60" text="url" displayMemberPath="url" />
</TableViewer.columns>

I didnot get any exceptions at all.
Both TableViewers are defined in the same xwt file.

Any help is much appreciated.

Thanks,
- Walter.
Re: XWT + TableViewer + Master/Details [message #503379 is a reply to message #503369] Sat, 12 December 2009 16:10 Go to previous messageGo to next message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
There are two issues in your codes:
1. "selection" should be replaced by "singleSelection"
"singleSelection" is the property name defined and used by JFace data
Binding for selection event
2. Since we don't know the element type of the collection (in runtime) in
testTV's table, we need to provide it in path experssion:
singleSelection.(j:X.pictures)
where j is the prefix of namespace corresponding to the package of the class
X, and X is the elemnt type of the table TV.

<TableViewer x:Name="ImageViewer" input="{Binding
elementName=testTV,path=singleSelection.(j:X.pictures)}">
<TableViewer.columns>
<TableViewerColumn width="60" text="url" displayMemberPath="url" />
</TableViewer.columns>
</TableViewer>

Best regards
Yves YANG
"Walter Prabhakar" <kwchess@gmail.com> wrote in message
news:hg038f$664$1@build.eclipse.org...
> Facing issues in showing nested Table Contents
>
> Master Shows the Data Correctly ( contains 2 rows )
> <TableViewer x:Name="testTV" x:style="BORDER|SINGLE|FULL_SELECTION"
> input="{Binding}">
>
> But in the nested table where the pictures ( a data member of master
> table ) is an collection of Picture objects containing url as a member, I
> couldn't see the data populated in ImageViewer.
> <TableViewer x:Name="ImageViewer" input="{Binding
> elementName=testTV,path=selection(pictures)}">
> <TableViewer.columns>
> <TableViewerColumn width="60" text="url" displayMemberPath="url" />
> </TableViewer.columns>
>
> I didnot get any exceptions at all.
> Both TableViewers are defined in the same xwt file.
>
> Any help is much appreciated.
>
> Thanks,
> - Walter.
>
Re: XWT + TableViewer + Master/Details [message #503383 is a reply to message #503379] Sat, 12 December 2009 16:26 Go to previous message
Walter Mising name is currently offline Walter Mising nameFriend
Messages: 128
Registered: July 2009
Senior Member
Thanks. It works.

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:hg0f8m$1ab$1@build.eclipse.org...
> There are two issues in your codes:
> 1. "selection" should be replaced by "singleSelection"
> "singleSelection" is the property name defined and used by JFace data
> Binding for selection event
> 2. Since we don't know the element type of the collection (in runtime) in
> testTV's table, we need to provide it in path experssion:
> singleSelection.(j:X.pictures)
> where j is the prefix of namespace corresponding to the package of the
> class X, and X is the elemnt type of the table TV.
>
> <TableViewer x:Name="ImageViewer" input="{Binding
> elementName=testTV,path=singleSelection.(j:X.pictures)}">
> <TableViewer.columns>
> <TableViewerColumn width="60" text="url" displayMemberPath="url" />
> </TableViewer.columns>
> </TableViewer>
>
> Best regards
> Yves YANG
> "Walter Prabhakar" <kwchess@gmail.com> wrote in message
> news:hg038f$664$1@build.eclipse.org...
>> Facing issues in showing nested Table Contents
>>
>> Master Shows the Data Correctly ( contains 2 rows )
>> <TableViewer x:Name="testTV" x:style="BORDER|SINGLE|FULL_SELECTION"
>> input="{Binding}">
>>
>> But in the nested table where the pictures ( a data member of master
>> table ) is an collection of Picture objects containing url as a member,
>> I couldn't see the data populated in ImageViewer.
>> <TableViewer x:Name="ImageViewer" input="{Binding
>> elementName=testTV,path=selection(pictures)}">
>> <TableViewer.columns>
>> <TableViewerColumn width="60" text="url" displayMemberPath="url"
>> />
>> </TableViewer.columns>
>>
>> I didnot get any exceptions at all.
>> Both TableViewers are defined in the same xwt file.
>>
>> Any help is much appreciated.
>>
>> Thanks,
>> - Walter.
>>
>
>
Re: XWT + TableViewer + Master/Details [message #565965 is a reply to message #503369] Sat, 12 December 2009 16:10 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
Registered: July 2009
Senior Member
There are two issues in your codes:
1. "selection" should be replaced by "singleSelection"
"singleSelection" is the property name defined and used by JFace data
Binding for selection event
2. Since we don't know the element type of the collection (in runtime) in
testTV's table, we need to provide it in path experssion:
singleSelection.(j:X.pictures)
where j is the prefix of namespace corresponding to the package of the class
X, and X is the elemnt type of the table TV.

<TableViewer x:Name="ImageViewer" input="{Binding
elementName=testTV,path=singleSelection.(j:X.pictures)}">
<TableViewer.columns>
<TableViewerColumn width="60" text="url" displayMemberPath="url" />
</TableViewer.columns>
</TableViewer>

Best regards
Yves YANG
"Walter Prabhakar" <kwchess@gmail.com> wrote in message
news:hg038f$664$1@build.eclipse.org...
> Facing issues in showing nested Table Contents
>
> Master Shows the Data Correctly ( contains 2 rows )
> <TableViewer x:Name="testTV" x:style="BORDER|SINGLE|FULL_SELECTION"
> input="{Binding}">
>
> But in the nested table where the pictures ( a data member of master
> table ) is an collection of Picture objects containing url as a member, I
> couldn't see the data populated in ImageViewer.
> <TableViewer x:Name="ImageViewer" input="{Binding
> elementName=testTV,path=selection(pictures)}">
> <TableViewer.columns>
> <TableViewerColumn width="60" text="url" displayMemberPath="url" />
> </TableViewer.columns>
>
> I didnot get any exceptions at all.
> Both TableViewers are defined in the same xwt file.
>
> Any help is much appreciated.
>
> Thanks,
> - Walter.
>
Re: XWT + TableViewer + Master/Details [message #565987 is a reply to message #503379] Sat, 12 December 2009 16:26 Go to previous message
Walter Mising name is currently offline Walter Mising nameFriend
Messages: 128
Registered: July 2009
Senior Member
Thanks. It works.

"Yves YANG" <yves.yang@soyatec.com> wrote in message
news:hg0f8m$1ab$1@build.eclipse.org...
> There are two issues in your codes:
> 1. "selection" should be replaced by "singleSelection"
> "singleSelection" is the property name defined and used by JFace data
> Binding for selection event
> 2. Since we don't know the element type of the collection (in runtime) in
> testTV's table, we need to provide it in path experssion:
> singleSelection.(j:X.pictures)
> where j is the prefix of namespace corresponding to the package of the
> class X, and X is the elemnt type of the table TV.
>
> <TableViewer x:Name="ImageViewer" input="{Binding
> elementName=testTV,path=singleSelection.(j:X.pictures)}">
> <TableViewer.columns>
> <TableViewerColumn width="60" text="url" displayMemberPath="url" />
> </TableViewer.columns>
> </TableViewer>
>
> Best regards
> Yves YANG
> "Walter Prabhakar" <kwchess@gmail.com> wrote in message
> news:hg038f$664$1@build.eclipse.org...
>> Facing issues in showing nested Table Contents
>>
>> Master Shows the Data Correctly ( contains 2 rows )
>> <TableViewer x:Name="testTV" x:style="BORDER|SINGLE|FULL_SELECTION"
>> input="{Binding}">
>>
>> But in the nested table where the pictures ( a data member of master
>> table ) is an collection of Picture objects containing url as a member,
>> I couldn't see the data populated in ImageViewer.
>> <TableViewer x:Name="ImageViewer" input="{Binding
>> elementName=testTV,path=selection(pictures)}">
>> <TableViewer.columns>
>> <TableViewerColumn width="60" text="url" displayMemberPath="url"
>> />
>> </TableViewer.columns>
>>
>> I didnot get any exceptions at all.
>> Both TableViewers are defined in the same xwt file.
>>
>> Any help is much appreciated.
>>
>> Thanks,
>> - Walter.
>>
>
>
Previous Topic:XWT + TableViewer + Master/Details
Next Topic:[xwt] Dynamic EMF data context not recognized
Goto Forum:
  


Current Time: Thu Mar 28 23:38:02 GMT 2024

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

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

Back to the top