I habe a BeanItemContainer with some kind of data objects and created a table with it. The beans have lets say attribute a and b. I would like to first format values of attributes a and b and then concat them to one value to display in one single column. How would I achieve that?
To make it a bit clearer. a is 340, b is 34 and I would like to display “+340 34%” in a table column.
you could hide the actual columns a and b and add a generated column to your Table which would then fetch the values and create formatted string you want to display. For more details, see the
book chapter on Table features.
A generated column with horizontal layout and two labels within did work perfectly out. The only thing is, that I enabled spacing for horizontal layout which cuts cell text a bit. Seems that column width calculation ignores spacing somehow.