I updated from 7.3.2 to 7.6.5.
It seems that the alignment of the required-field-indicator changes significant in GridLayouts.
In 7.3.2 the field-indicator was just on the right of a TextField.
In 7.6.5 the field-indicator is aligned to the right of the grid column. If the column is much wider than the TextField and the TextField is aligned to the left, there is a lot of space between the field and the indicator, which does not look really good.
I have reproduced it with this little code, which i adapted from the vaadin demo:
[code]
public class GridTest extends GridLayout
{
GridTest sample;
public GridTest()
{
super();
// Create a grid layout
sample = this;
sample.addStyleName("outlined");
sample.setWidth(600, Unit.PIXELS);
sample.setHeight(300, Unit.PIXELS);
generateMatrixGrid(3, 2);
}
private void generateMatrixGrid(final int rows, final int columns) {
sample.removeAllComponents();
sample.setRows(rows);
sample.setColumns(columns);
for (int row = 0; row < sample.getRows(); row++) {
for (int col = 0; col < sample.getColumns(); col++) {
final LayoutChildComponent child = new LayoutChildComponent(sample, false);
sample.addComponent(child);
sample.setRowExpandRatio(row, 0.0f);
sample.setColumnExpandRatio(col, 0.0f);
}
}
}
class LayoutChildComponent extends TextField
{
public LayoutChildComponent(GridLayout grid, boolean bool) {
setValue("Child " + (grid.getComponentCount() + 1));
setRequired(true);
}
}
}
[/code]Is this a bug?
Thanks,
Christian