I think that there is a UI bug with buttons. I have buttons defined like with this :
@Override
protected boolean getConfiguredProcessButton() {
return false;
}
@Override
protected boolean getConfiguredFillHorizontal() {
return true;
}
but they fill the space to much, like shown in this picture :
Is this a bug, or I missing something?
By default all form-fields in Scout Html UI reserve some space on the right side, to display their (info-, error-) status or the context menu icon. I guess that's also the case with the table/group-box-title we see in your picture. Try IFormField#setStatusVisible(boolean) or override AbstractFormField#getStatusVisible().
A small hint: The table has it's own menu-bar. So I would rather add the "new row" action as a menu with menu-type 'EMPTY_SPACE' to the table and the "delete row" action as a menu with menu-type 'SINGLE/MULTI_SELECTION' instead of adding buttons to the form. Example:
public class SampleTable extends AbstractTable {
@Order(10)
public class NewMenu extends AbstractMenu {
@Override
protected Set<? extends IMenuType> getConfiguredMenuTypes() {
return CollectionUtility.<IMenuType> hashSet(TableMenuType.EmptySpace);
}
@Override
protected String getConfiguredText() {
return TEXTS.get("New");
}
@Override
protected void execAction() {
// TODO: impl. new
}
}
@Order(20)
public class DeleteMenu extends AbstractMenu {
@Override
protected Set<? extends IMenuType> getConfiguredMenuTypes() {
return CollectionUtility.<IMenuType> hashSet(TableMenuType.MultiSelection, TableMenuType.SingleSelection);
}
@Override
protected String getConfiguredText() {
return TEXTS.get("Delete");
}
@Override
protected void execAction() {
// TODO: impl. delete
}
}
}
For a full example check the TableFieldForm / AbstractFileTableField in the Scout demo application called "widgets". The application is hosted here: