Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Display a string in Table when there are no items(Descriptive string in Table)
Display a string in Table when there are no items [message #903079] Tue, 21 August 2012 20:47 Go to next message
Ronald So is currently offline Ronald SoFriend
Messages: 198
Registered: April 2011
Senior Member

When a SWT table contains no items, is it a way to put in a string like "No items found." instead of showing an empty table?

Re: Display a string in Table when there are no items [message #903086 is a reply to message #903079] Tue, 21 August 2012 21:10 Go to previous message
Cole Markham is currently offline Cole MarkhamFriend
Messages: 150
Registered: July 2009
Location: College Station, TX
Senior Member

Hi Ronald,

There are a few ways I can think of that you could handle the case:

1. Insert a row in the table to display the message. If you are using a jface viewer with LabelProvider, you probably want to make this a different type of object and handle the getText() method differently.

2. Put a label widget in a StackLayout with the table and switch the label to the top if there are no results. I have done this also while the table is loading in the background if it will take a long time. You can also use a Composite and put a progress bar there, etc.

3. Add a label above or below the table that always shows the number of results returned.
Previous Topic:Optimized table automated testing using Selenium WebDriver
Next Topic:Selection is cleared in IE9
Goto Forum:

Current Time: Wed Oct 20 11:34:59 GMT 2021

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

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

Back to the top