Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Does Nebula autoheight feature support grids with RowTemplates?
Does Nebula autoheight feature support grids with RowTemplates? [message #1712980] Thu, 29 October 2015 17:18 Go to next message
Antoni Mylka is currently offline Antoni MylkaFriend
Messages: 14
Registered: January 2015
Junior Member
I have a row template with three cells.
/---------------------------------------------------\
| ICON     | TITLE (one line, no wrap)              |
|----------+----------------------------------------|
|          | DESCRIPTION (with wrap, can potentially|
|          | need additional lines if the text is   |
|          | really long)                           |
\---------------------------------------------------/

If descriptions are null, I want the table to look like this:
/---------------------------------------------------\
| ICON     | The first title                        |
|----------+----------------------------------------|
| ICON     | The second title                       |
|----------+----------------------------------------|
| ICON     | The third title                        |
|----------+----------------------------------------|
| ICON     | The fourth title                       |
|----------+----------------------------------------|
| ICON     | The fifth title                        |
\----------+----------------------------------------/

i.e. I want the item height to show only those two cells, as if there was nothing else.
But if some items have non-null descriptions, then I want them to be shown, with automatic wrapping and automatically adjusted item height.
/---------------------------------------------------\
| ICON     | The first title                        |
|          | description line 1                     |
|----------+----------------------------------------|
| ICON     | The second title                       |
|          | description line 1                     |
|          | description line 2                     |
|----------+----------------------------------------|
| ICON     | The third title                        |
|          | description line 1                     |
|          | description line 2                     |
|          | description line 3                     |
|----------+----------------------------------------|
| ICON     | The fourth title                       |
|----------+----------------------------------------|
| ICON     | The fifth title                        |
\----------+----------------------------------------/

My real question is: is this supposed to work at all, or is it a limitation of the autoheight feature that it doesn't actually support grids with RowTemplates? If it is, then what do I need to do apart from:

  • TextCell.setWrap(true)
  • Grid.setAutoHeight(true)
  • GridColumn.setWordWrap(true)
Re: Does Nebula autoheight feature support grids with RowTemplates? [message #1713100 is a reply to message #1712980] Fri, 30 October 2015 22:44 Go to previous message
Antoni Mylka is currently offline Antoni MylkaFriend
Messages: 14
Registered: January 2015
Junior Member
I stopped looking. Grid.setAutoHeight does NOT seem to work with row templates.

I switched to a "normal" table without row templates. Now I have two columns. The first one shows the image. The second one the title and description as a single string with markup. setAutoHeight seems to support tables with markup.

In the process I discovered that:


  1. I can't make the icon aligned to the top because of https://bugs.eclipse.org/bugs/show_bug.cgi?id=361796 and https://bugs.eclipse.org/bugs/show_bug.cgi?id=246608. Vertical alignment is not supported in tables.
  2. I can't compute the real height of the visible rows of the table on the server side. AutoHeight is a purely client-side construct. For example calling grid.computeSize(knownWidth, SWT.DEFAULT).y gives me the "hypothetical" height of the grid as if the width were infinite and there was no wrapping. My idea was to relayout the parent composite whenever the content of any cell in the table changes. I wanted to have some buttons below the table that would move appropriately as rows in the table appear or disappear. I just can't do that. A grid with auto height MUST operate within a fixed space and show scrollbars if necessary, because the server can't know the real height of each row.
Previous Topic:Open Session in view antipattern and RAP 3.0
Next Topic:RAP application won't run
Goto Forum:
  


Current Time: Thu Apr 18 21:02:42 GMT 2024

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

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

Back to the top