Dynamic UI column name

Hi all guys.

Is there a way to give the user the possibility to name a Table column has he need?

For example Order entity has id, date, customer, field1, field2.
Fields 1 and 2 are generic String fields where user can store everything he needs. And it would be easier for him to customize the name of the column table “fields1” to “foo”.

Thanks for your support.


You can change the caption of column in the controller:

private GroupTable<SomeEntity> myTable;

myTable.getColumn("field1").setCaption("User's caption");

And save and restore it by using settings mechanism:

protected void applySettings(Settings settings) {

    Element tableElement = getSettings().get("myTable");

    // restore caption

protected void saveSettings() {
    Element tableElement = getSettings().get("myTable");

    // save caption


Your table should use settingsEnabled="true" (it’s true by default).