(Really) dynamic form fields? [message #703425] |
Wed, 27 July 2011 15:01  |
Eclipse User |
|
|
|
Hello
Is it possible to create form fields on the fly, when form is already open?
I am aware of the method AbstractCompositeField.injectFieldsInternal(List<IFormField>), but this method is only executed once during the initialization of the GroupBox. In my case, the number and the type of fields to inject is not known at that time. There is a SmartField on the form and when the user chooses a value from it, a service is called that then returns a list of field descriptions. These field descriptions should then be transformed to form fields inside a group box.
It is my current understanding that this is not possible. Can someone please confirm that, or give an example how it could be done? (Current workaround: Generate a sufficiently large bunch of fields for each type and make only those visible that are needed, change labels etc... But that's not really dynamic, is it?)
Thank you very much.
B.
|
|
|
Re: (Really) dynamic form fields? [message #718604 is a reply to message #703425] |
Wed, 24 August 2011 20:06   |
Eclipse User |
|
|
|
Hi Beat
What about using a table on that form with an editable column, and another column for the field label? It is possible to create a field of any type in the cell when it is edited. And since it is a table, you can have unlimited rows (with fields).
Adrian
|
|
|
|
Re: (Really) dynamic form fields? [message #1711254 is a reply to message #1711017] |
Wed, 14 October 2015 11:08  |
Eclipse User |
|
|
|
Hi,
I'm still trying to implement dynamic forms in my Scout application...
Is it somehow possible to put whole FormFields (also Container elements like SequenceBoxes) in a table cell? Thereby you would be very flexible and each row of the table could contain a variable number of fields. You could predefine FormFields an add instances of it to the table. Would be very nice...
Instead, the obvious approach to use different columns (SmartColumns, StringColumns, BooleanColumns) , is also very static as you are not able to change the number of elements from row to row.
Another benefit of FormFields in cells would be enhanced capability of changing the rendering/style of the elements. I don't like that the table cells only have this tiny 'editable' hint icon in the upper left corner and their actual content is only visible when the cell is clicked.
As a test I tried to put a SequenceBox with a Button as VALUE in a parametrized AbstractColumn<SequenceBox> cell. It works fine without any problems, but as supposed, there is no magic renering the elements in the table view.
So guys, please help us to understand, how it is possible to achieve (really) dynamic forms with Scout. There has to be some workaround or even built-in feature that we are missing.
[Updated on: Wed, 14 October 2015 11:11] by Moderator Report message to a moderator
|
|
|
Powered by
FUDForum. Page generated in 0.03102 seconds