Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » NatTable » How to select rows with matching text in whole row or single column
How to select rows with matching text in whole row or single column [message #1792152] Thu, 12 July 2018 08:01 Go to next message
Markus Barbey is currently offline Markus BarbeyFriend
Messages: 8
Registered: April 2016
Junior Member
Hi there,

is it possible to set a (multi) selection based on some text or regex easily in a filled NatTable?

If yes - how can I achieve that?

Best regards,
Markus
Re: How to select rows with matching text in whole row or single column [message #1792158 is a reply to message #1792152] Thu, 12 July 2018 09:01 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Do you want to select or to highlight those rows?

If you really want to select them, no.
If you want to highlight them, yes.
Re: How to select rows with matching text in whole row or single column [message #1792159 is a reply to message #1792158] Thu, 12 July 2018 09:17 Go to previous messageGo to next message
Markus Barbey is currently offline Markus BarbeyFriend
Messages: 8
Registered: April 2016
Junior Member
Hi Dirk,

I really want to select them in order to perform an action with them - like open or delete - in an automated UI test...

As NatTable itself does not provide this feature, I will perform the search on my underlying data model to resolve the corresponding data objects or there indices and set the selection with those results.

Thanks for your quick reply
Markus
Re: How to select rows with matching text in whole row or single column [message #1792164 is a reply to message #1792159] Thu, 12 July 2018 09:38 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
well searching can also be done via the SearchAction ... but that actually does not perform a multi selection
Re: How to select rows with matching text in whole row or single column [message #1792169 is a reply to message #1792164] Thu, 12 July 2018 10:01 Go to previous messageGo to next message
Markus Barbey is currently offline Markus BarbeyFriend
Messages: 8
Registered: April 2016
Junior Member
hmm... maybe the term "search" has been a little bit misleading...

Based on a filled NatTable - not providing a NatTable search dialog - I want to

1. select a single row that contains a text or matches a regex - uniqueness has to be guaranteed somehow; otherwise the UI test should fail. This unique selection will be processed in the upcoming test steps.
2. select e.g. 3 rows matching a text or matching a regex. It has do be guaranteed somehow, that exactly the desired 3 rows are selected. These 3 rows will be deleted in order to test proper deletion functionality in our application.
Re: How to select rows with matching text in whole row or single column [message #1792181 is a reply to message #1792169] Thu, 12 July 2018 10:56 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Understand. The logic to find a cell based on some input is implemented inside the SearchDialog, so you can not reuse it for your cases. You will need to implement that yourself. Just keep in mind that rows and columns could be hidden or transformed so you could have findings in the underlying data collection which is not available in the SelectionLayer.
Re: How to select rows with matching text in whole row or single column [message #1792184 is a reply to message #1792181] Thu, 12 July 2018 11:18 Go to previous message
Markus Barbey is currently offline Markus BarbeyFriend
Messages: 8
Registered: April 2016
Junior Member
okay...

thanks for the hint with the hidden/transformed rows and columns :-)
Previous Topic:Use of coma in formula
Next Topic:How to paint over header cell boundaries via an own cHeaderCellPainter
Goto Forum:
  


Current Time: Thu Mar 28 08:58:20 GMT 2024

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

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

Back to the top