I have two questions regarding tables. Please excuse me if the answer is too obvious…
1.- Can a column and its header have different aligments?..if I use
table.setColumnAlignment(propertyId,Table.ALIGN_RIGHT); the header also moves right, and I want it to stay in the center…
2.- The container data source of the table (mysql) is formated as
Double , with a lot of decimals, and I want to show the data as
Integer , with thousand separators…how can I do this?
1.- the setColumnHeaders method of Table accepts only an array of Strings. So, except providing an extra style for each column header, I have no other idea.
2.- the class com.vaadin.data.util.PropertyFormatter enables to provide your own format for the TextField values. The example provided in the API page is a bit too simple compared to what you are planning, but this is a beginning. In fact, I have another issue with formatting. I want to have an automatic formatting of TextFields according to the type of data (Integer, Double, String) in the FormFactory or TableFactory. fOr the moment, I am only able to customize the Field according to the type of Field (TextField, DateField).