Source:
protected void initTable() { getTable().enableColumnResizing(); AbstractTextColumn<Label> nameColumn = new AbstractTextColumn<Label>() { @Override public String getValue(Label label) { return label.getName(); } }; nameColumn.makeSortable(); getTable().addColumn(nameColumn, constants.affinityLabelsNameColumnLabel(), "150px"); AbstractTextColumn<Label> vmMembersColumn = new AbstractTextColumn<Label>() { @Override public String getValue(Label object) { String vmNames = join(getVmNames(object), ", "); if (vmNames.isEmpty()) { return constants.affinityLabelsNoMembers(); } return vmNames; } }; vmMembersColumn.makeSortable(); getTable().addColumn(vmMembersColumn, constants.affinityLabelsVmsColumnLabel(), "500px"); AbstractTextColumn<Label> hostMembersColumn = new AbstractTextColumn<Label>() { @Override public String getValue(Label object) { String hostNames = join(getHostNames(object), ", "); if (hostNames.isEmpty()) { return constants.affinityLabelsNoMembers(); } return hostNames; } }; hostMembersColumn.makeSortable(); getTable().addColumn(hostMembersColumn, constants.affinityLabelsHostsColumnLabel(), "500px"); getTable().addActionButton(new WebAdminButtonDefinition<Label>(constants.affinityLabelsSubTabNewButton()) { @Override protected UICommand resolveCommand() { return getDetailModel().getNewCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<Label>(constants.affinityLabelsSubTabEditButton()) { @Override protected UICommand resolveCommand() { return getDetailModel().getEditCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<Label>(constants.affinityLabelsSubTabDeleteButton()) { @Override protected UICommand resolveCommand() { return getDetailModel().getRemoveCommand(); } }); }

Target:
protected void initTable() { getTable().enableColumnResizing(); AbstractTextColumn<Label> nameColumn = new AbstractTextColumn<Label>() { @Override public String getValue(Label label) { return label.getName(); } }; nameColumn.makeSortable(); getTable().addColumn(nameColumn, constants.affinityLabelsNameColumnLabel(), "150px"); AbstractTextColumn<Label> vmMembersColumn = new AbstractTextColumn<Label>() { @Override public String getValue(Label label) { String vmNames = join(getVmNames(label), ", "); if (vmNames.isEmpty()) { return constants.affinityLabelsNoMembers(); } return vmNames; } }; vmMembersColumn.makeSortable(); getTable().addColumn(vmMembersColumn, constants.affinityLabelsVmsColumnLabel(), "500px"); AbstractTextColumn<Label> hostMembersColumn = new AbstractTextColumn<Label>() { @Override public String getValue(Label label) { String hostNames = join(getHostNames(label), ", "); if (hostNames.isEmpty()) { return constants.affinityLabelsNoMembers(); } return hostNames; } }; hostMembersColumn.makeSortable(); getTable().addColumn(hostMembersColumn, constants.affinityLabelsHostsColumnLabel(), "500px"); getTable().addActionButton(new WebAdminButtonDefinition<Label>(constants.affinityLabelsSubTabNewButton()) { @Override protected UICommand resolveCommand() { return getDetailModel().getNewCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<Label>(constants.affinityLabelsSubTabEditButton()) { @Override protected UICommand resolveCommand() { return getDetailModel().getEditCommand(); } }); }