Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 405472

Summary: [List] Content not shown correctly if markup is enabled
Product: [RT] RAP Reporter: Claudio Guglielmo <claudio.guglielmo>
Component: RWTAssignee: Project Inbox <rap-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: rsternberg, tbuschto
Version: 2.1   
Target Milestone: 2.1 M2   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Snippet
none
Image to show the problem with the height none

Description Claudio Guglielmo CLA 2013-04-11 10:01:54 EDT
Created attachment 229618 [details]
Snippet

I would like to display a html table inside a list row. The table has 3 columns, the width of the first and last column are fixed, the middle one takes the rest. It also displays a bottom border. The table is supposed to use 100% of the height and 100% of the width.

The problem is that the last column isn't displayed at all and the border is not at the correct place. It seems there is a miscalculation of the width and the height. See example snippet.
Comment 1 Claudio Guglielmo CLA 2013-04-11 10:03:04 EDT
Created attachment 229619 [details]
Image to show the problem with the height
Comment 2 Ivan Furnadjiev CLA 2013-04-15 06:57:03 EDT
Markup support for widgets was designed to support only inline elements. <table> is not an inline element and does not exists in the MarkupValidator. Probably you skipped the markup validation completely in order to display the <table>. That's why I think that this is not a bug at all.
Comment 3 Ralf Sternberg CLA 2013-04-15 07:04:07 EDT
I agree with Ivan. The markup support is not designed to contain block elements. I'm sure there are better ways to align content in a table row, e.g. using margin-left in a style attribute.
Comment 4 Claudio Guglielmo CLA 2013-04-15 08:23:37 EDT
I know that the table is a little heavy, but I tried a lot of different approaches but found none that really worked. I need the following:
Icon on the left, then text with variable length, then icon aligned right. Everything needs to be vertically aligned middle. The text needs to show an ellipsis if its too long. Sounds simple but turned out to be quite impossible, at least for me. 

We already use exactly this html code with rap 1.5 and a patch provided by Tim. It works perfectly. We also use html tables inside the table widget which works too (without patch). 

It might not be a bug but it definitely is something we really need.
Comment 5 Tim Buschtoens CLA 2013-04-16 04:27:08 EDT
The issue could likely reproduced without the table with any markup that relies on the parents width/height. The bug should be marked as enhancement though, as this is not what the markup support was initially designed for.
Comment 6 Tim Buschtoens CLA 2013-04-23 10:15:53 EDT
Fixed as of commit 4656945d7d7f5a923cdc7e8947ec4a556e0ca0c5.

I fixed this with a combination of client and server side changes: The server now sets all item dimensions to the width of the List if it is not horizontally scrollable. On the client the div that contains the items texts now does use all space that is available, excluding padding. To include the padding, set it to 0px in the theming. Another small optimization is that the server no longer measures the items width if the List is not horizontally scrollable *and* no computeSize is called.