Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » TableViewer + ViewerSorter
TableViewer + ViewerSorter [message #132993] Fri, 15 May 2009 08:55 Go to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

I wanted to sort my table column through a double click on it. I don't
have a good idea how I can do it. I can set a viewer sorter on my table
viewer. It is the right way?

Thanks,
kristin
Re: TableViewer + ViewerSorter [message #133021 is a reply to message #132993] Fri, 15 May 2009 10:41 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Kristin,

> I wanted to sort my table column through a double click on it. I don't
> have a good idea how I can do it. I can set a viewer sorter on my table
> viewer. It is the right way?

the SWT snippets [1] contain examples on how to sort a Table. See for
instance "sort a table by column".

Hope this helps,
Ralf

[1] http://www.eclipse.org/swt/snippets/
Re: TableViewer + ViewerSorter [message #133600 is a reply to message #133021] Wed, 20 May 2009 07:36 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hi Ralf,

Thanks, it was helpfully. But I have yet another problem. I can select a
line in my table viewer (tableViewer view) and see the information of the
selected line in another view (detail view) and in a new structure. If I
sort my table up and down, I can select a line in my table viewer but the
selection don't identify of my detail view.
I have a selectionProvider in my tableViewer view and a selectionListener
in my detail view. The tableColumns have a listener for the sort.
Can I don't have multiple listener? Do you have a idea what the problem
is?


Thanks,
kristin
Re: TableViewer + ViewerSorter [message #133681 is a reply to message #133600] Wed, 20 May 2009 10:36 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Kristin,

> Thanks, it was helpfully. But I have yet another problem. I can select a
> line in my table viewer (tableViewer view) and see the information of
> the selected line in another view (detail view) and in a new structure.
> If I sort my table up and down, I can select a line in my table viewer
> but the selection don't identify of my detail view.

I'm afraid I don't understand this. What do you mean by "the selection
don't identify of my detail view"?

> I have a
> selectionProvider in my tableViewer view and a selectionListener in my
> detail view. The tableColumns have a listener for the sort. Can I don't
> have multiple listener? Do you have a idea what the problem is?

Do you use the Workbench selection service? If so, maybe this article
could help:
http://www.eclipse.org/articles/Article-WorkbenchSelections/ article.html

Best regards, Ralf
Re: TableViewer + ViewerSorter [message #133688 is a reply to message #133681] Wed, 20 May 2009 10:43 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

The selection listener of my detail view have no selection in my table
view when I have a selected line after the sort in my table view. The
listener don't reacts of the selection.

kristin
Re: TableViewer + ViewerSorter [message #134144 is a reply to message #133688] Tue, 26 May 2009 15:05 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

It is possible to have a SelectionProvider and a SelectionListener in the
same view? I have some problems with my listeners.

Thanks,
kristin
Re: TableViewer + ViewerSorter [message #134182 is a reply to message #134144] Wed, 27 May 2009 08:45 Go to previous messageGo to next message
Ralf Sternberg is currently offline Ralf SternbergFriend
Messages: 1313
Registered: July 2009
Senior Member

Hi Kristin,

> It is possible to have a SelectionProvider and a SelectionListener in
> the same view?

Yes, this is possible.

I have some problems with my listeners.

Did you check the article on the selection service mentioned before?
This should really explain everything. You could also take a look at the
RAP demo, which also uses the selection service, e.g. DemoTableViewPart,
DemoSelectionViewPart, etc.

Ralf
Re: TableViewer + ViewerSorter [message #134248 is a reply to message #134182] Wed, 27 May 2009 13:50 Go to previous messageGo to next message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
Hello,

Yes I read the article "Using the Selection Service". But I didn't find a
solution for my problem.
I have 2 views in my application. A table view and a detail view. In the
table view, there is a SelectionProvider and a SelectionListener in the
detail view. If I select a line in the table view, I see the infos of the
selected line in my detail view. So, it works fine for this task.
If I sort my table view with a click on the table column, I want to select
again a line in my table view but I see no infos of this line in my detail
view. That is the selection listener in the detail view see the changing
selection but the ISelection is empty.

It is not simple to explain, but I hope you understand my problem.


Thanks, kristin
Re: TableViewer + ViewerSorter [message #134261 is a reply to message #134248] Wed, 27 May 2009 14:00 Go to previous message
No real name is currently offline No real nameFriend
Messages: 38
Registered: July 2009
Member
I forget a detail. I sort my table column with a listener.
This listener is registered on the table columns of the table in the table
view.
So, I have a listener and a SelectionProvider in my table view.
Previous Topic:Do not use workbench as service locator
Next Topic:how to have a secure perspective?
Goto Forum:
  


Current Time: Sun Nov 28 03:49:40 GMT 2021

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

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

Back to the top