
|
If you were logged in you would be able to see more operations.
|
|
|
Click
Created: 04/Jun/08 01:24 PM
Updated: 03/Jul/08 09:48 PM
|
|
| Component/s: |
core
|
| Affects Version/s: |
1.5 M2
|
| Fix Version/s: |
1.5 M2
|
|
|
This code was supported in click 1.4.1
fieldSet.setColumns(3);
Allowing a field set to have a different column layout to the form.
It is no longer supported in 1.5 M2.
|
|
Description
|
This code was supported in click 1.4.1
fieldSet.setColumns(3);
Allowing a field set to have a different column layout to the form.
It is no longer supported in 1.5 M2.
|
Show » |
|
|
This is a little tricky as FieldSet in 1.4 laid out its fields in a grid like fashion, which is why setColumns worked. The advantage here was that its easy to add fields and have it automatically laid out in a Table. The disadvantage is that it was limited to Fields only.
In 1.5 with the introduction of Container, FieldSet does not layout its fields anymore. The advantage here is that any Control can be added to FieldSet including Tables, Grids etc.
So perhaps we should look at adding some building blocks for doing layouts. For example having a Grid control could alleviate this issue somewhat:
From this:
FieldSet fieldSet = new FieldSet("fieldSet");
fieldSet.setColumns(2);
fieldSet.add(new TextField("field1"));
fieldSet.add(new TextField("field2"));
to this:
FieldSet fieldSet = new FieldSet("fieldSet");
Grid grid = new Grid();
fieldSet.add(grid);
grid.setColumns(2);
grid.add(new TextField("field1"));
grid.add(new TextField("field2"));
Would this work OK?