Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Table in Table Column(Add a Table in Table Column Field)
Table in Table Column [message #1189289] Sat, 16 November 2013 02:23 Go to next message
Walter Mising name is currently offline Walter Mising name
Messages: 126
Registered: July 2009
Senior Member
Use case

I have a Table of Employees, and for each row ( Employee ), I would like to show the corresponding Dependants horizontally in one of the columns.

Table ( Employee )
=> Column Name ( String )
=> Column Dependants ( Table )
=>=> Table ( Dependants )
=>=>=> Column Name ( String )
=>=>=> Column DOB ( Date )
=>=>=> Column Other Details ( HTML )

I *don't want* to have Master Details kind of presentation where the List of all employees is shown at the top and details are shown in another table below for the selected employee.

-Walter
Re: Table in Table Column [message #1193832 is a reply to message #1189289] Mon, 18 November 2013 07:38 Go to previous messageGo to next message
Urs Beeli is currently offline Urs Beeli
Messages: 335
Registered: October 2012
Location: Bern, Switzerland
Senior Member
I'm not sure what your question is, but I assume that you are wondering what widget to use to display this information, is this correct?

One possibility would be to use a table, where the entry in the first column (Name) is repeated for each dependant (though I'm not sure how well that will work with the "Other Details", depending on how much information you have in there).

Another possibility might be a TreeField, where each Employee is a top level node, then all the Dependants are child nodes of the employee they belong to and their Name, DOB and Details could be nodes of each "dependant node". Same here, though, I'm not sure the HTML details can be shown easily.

In case you are looking for a combination of a tree and a table, I don't think that is available in Scout at the moment.

If this does not answer your question, you might need to elaborate a little. Also, it would probably help if you actually asked a question, so we would know what it is that you hope to get form this post Smile
Re: Table in Table Column [message #1194404 is a reply to message #1193832] Mon, 18 November 2013 13:47 Go to previous messageGo to next message
Walter Mising name is currently offline Walter Mising name
Messages: 126
Registered: July 2009
Senior Member
Well, I am looking for a Tabbox where I have a table shown.
For each row, I need to embed another table in a particular column.

Is that possible ?

Secondly, is it possible to embed HTML contents in a column. Basically, it would be a workaround for the above mentioned use case.

-Thanks.
Re: Table in Table Column [message #1200282 is a reply to message #1194404] Thu, 21 November 2013 06:52 Go to previous messageGo to next message
Urs Beeli is currently offline Urs Beeli
Messages: 335
Registered: October 2012
Location: Bern, Switzerland
Senior Member
Walter Mising name wrote on Mon, 18 November 2013 14:47
where I have a table shown.For each row, I need to embed another table in a particular column.

Secondly, is it possible to embed HTML contents in a column.


Somone from the Scout developer team correct me if I'm wrong, but I think neither of the two things you want to do is possible, that is why I described some workarounds that could be used as an approximation to what you want.
Re: Table in Table Column [message #1201774 is a reply to message #1200282] Thu, 21 November 2013 22:44 Go to previous message
Lukas Huser is currently offline Lukas Huser
Messages: 42
Registered: March 2010
Member
Hi Walter

I also think that there is no such thing as a "table within a table" in Scout. A table field is probably not particularily well suited to represent this kind of hierarchical data.
If you a) need to display some HTML content anyway and b) your parent table has only two columns (employee name and dependants) you're maybe better off with a HtmlField? It allows rendering arbitrary HTML content, including HTML tables.

"Walter Mising name"
Secondly, is it possible to embed HTML contents in a column.

Well, it depends Smile Scout does not offer this feature by itself, but you can exploit the underlying UI technology to some extent.

Swing renders HTML in most of its UI components [1]. You can use this feature also in a Scout Swing client: Just surround the content of a StringColumn with <html>...</html> tags. You need to enable the "text wrap" property on a StringColumn if you want to render multi-line content in a single table row.

As far as I know, the SWT client does not support HTML rendering in this way.

I have quickly verified that HTML rendering also works in the RAP client, but it seems that it is not possible to render multi-line content in the same way as in the Swing client.

[1] http://docs.oracle.com/javase/tutorial/uiswing/components/html.html

Lukas
Previous Topic:Exception with anchors in HtmlField
Next Topic:SWT Client startup Error
Goto Forum:
  


Current Time: Thu Oct 23 04:08:48 GMT 2014

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

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