Source:
<code>void initTable(ApplicationConstants constants) { getTable().enableColumnResizing(); TextColumnWithTooltip<GlusterVolumeOptionEntity> optionKeyColumn = new TextColumnWithTooltip<GlusterVolumeOptionEntity>() { @Override public String getValue(GlusterVolumeOptionEntity option) { return option.getKey(); } }; optionKeyColumn.makeSortable(new Comparator<GlusterVolumeOptionEntity>() { @Override public int compare(GlusterVolumeOptionEntity o1, GlusterVolumeOptionEntity o2) { <START> return o1.getKey().compareTo(o2.getKey()); <END> } }); getTable().addColumn(optionKeyColumn, constants.optionKeyVolumeParameter(), "400px"); TextColumnWithTooltip<GlusterVolumeOptionEntity> optionValueColumn = new TextColumnWithTooltip<GlusterVolumeOptionEntity>() { @Override public String getValue(GlusterVolumeOptionEntity option) { return option.getValue(); } }; optionValueColumn.makeSortable(new Comparator<GlusterVolumeOptionEntity>() { @Override public int compare(GlusterVolumeOptionEntity o1, GlusterVolumeOptionEntity o2) { return o1.getValue().compareTo(o2.getValue()); } }); getTable().addColumn(optionValueColumn, constants.optionValueVolumeParameter(), "400px"); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.addVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getAddParameterCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.editVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getEditParameterCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.resetVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getResetParameterCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.resetAllVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getResetAllParameterCommand(); } }); }</code><technical_language>Please consider LexoNumericComparator for comparing String values</technical_language>

Target:
void initTable(ApplicationConstants constants) { getTable().enableColumnResizing(); TextColumnWithTooltip<GlusterVolumeOptionEntity> optionKeyColumn = new TextColumnWithTooltip<GlusterVolumeOptionEntity>() { @Override public String getValue(GlusterVolumeOptionEntity option) { return option.getKey(); } }; optionKeyColumn.makeSortable(); getTable().addColumn(optionKeyColumn, constants.optionKeyVolumeParameter(), "400px"); TextColumnWithTooltip<GlusterVolumeOptionEntity> optionValueColumn = new TextColumnWithTooltip<GlusterVolumeOptionEntity>() { @Override public String getValue(GlusterVolumeOptionEntity option) { return option.getValue(); } }; optionValueColumn.makeSortable(); getTable().addColumn(optionValueColumn, constants.optionValueVolumeParameter(), "400px"); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.addVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getAddParameterCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.editVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getEditParameterCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.resetVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getResetParameterCommand(); } }); getTable().addActionButton(new WebAdminButtonDefinition<GlusterVolumeOptionEntity>(constants.resetAllVolumeParameter()) { @Override protected UICommand resolveCommand() { return getDetailModel().getResetAllParameterCommand(); } }); }