Hello,
We want to control the automatic layout of a form.
We don't want to control each field of the form manually.
We want to change this behaviour:
This gives us what we need, but instead of the default left to right layout, we want the 2nd field to be put in the 1st column under the 1st field.
So for 5 datasource fields we would get
field1 | field4
field2 | field5
field3 |
Our datasources are filled up dynamically, so we don't know how many fields will follow, so we can't hardcode this layout.
The interface FormLayout doesn't get me much wiser... what exactly happens when calling the code above? Where do the forms get layout left to right, etc?
We came across setItemLayout() on DynamicForm. Do we have to implement our own FormLayoutType ?
I guess ultimately we could split the 1 form over 2 forms, and put them next to each other. But is that a good approach..
thanks for the input
We want to control the automatic layout of a form.
We don't want to control each field of the form manually.
We want to change this behaviour:
Code:
DynamicForm form = new DynamicForm(); form.setNumCols(4); form.setDataSource(ds);
So for 5 datasource fields we would get
field1 | field4
field2 | field5
field3 |
Our datasources are filled up dynamically, so we don't know how many fields will follow, so we can't hardcode this layout.
The interface FormLayout doesn't get me much wiser... what exactly happens when calling the code above? Where do the forms get layout left to right, etc?
We came across setItemLayout() on DynamicForm. Do we have to implement our own FormLayoutType ?
I guess ultimately we could split the 1 form over 2 forms, and put them next to each other. But is that a good approach..
thanks for the input
Comment