I have a table. It’s in editable mode. One column is represented by Comboboxes.
After user resizes colum Comboboxes don’t resize with it. Then once user clicks on drop-down button and combo drops down - its with adopts to new with.
On attached screenshot upper Combobox is just dropped down and so resized. Combo on bottom left untouched after column resize so it didn’t resize.
Vaadin 6.6.5.
Question: What have I do to makeCombobox resize automatically with parent Table column?
...
goodsTable.setSelectable(true);
goodsTable.setEditable(true);
goodsTable.setImmediate(true);
goodsTable.setFooterVisible(true);
goodsTable.setColumnFooter("priceUSD", "Сумма");
goodsTable.setTableFieldFactory(goodsTableFactory);
goodsTable.setContainerDataSource(goodsContainer);
goodsTable.setVisibleColumns(SHIPMENT_LINE_COLUMNS);
...
private class GoodsTableFactory extends DefaultFieldFactory {
@Override
public Field createField(Container container, Object itemId, Object propertyId, Component uiContext)
{
Field field;
if ("good".equals(propertyId)) {
final ComboBox combo = new ComboBox();
final BeanItemContainer goodsContainer =
new BeanItemContainer(Good.class, getGoods());
combo.setFilteringMode(ComboBox.FILTERINGMODE_CONTAINS);
combo.setContainerDataSource(goodsContainer);
combo.setRequired(true);
combo.setWidth("100%");
field = combo;
} else {
field = super.createField(container, itemId, propertyId, uiContext);
}
return field;
}
}