Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » (Really) dynamic form fields?(Is it possible to generate new field depending on some user input, e.g. at SmartField?)
(Really) dynamic form fields? [message #703425] Wed, 27 July 2011 15:01 Go to next message
Beat Schwarzentrub is currently offline Beat SchwarzentrubFriend
Messages: 43
Registered: November 2010

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.

Re: (Really) dynamic form fields? [message #718604 is a reply to message #703425] Wed, 24 August 2011 20:06 Go to previous message
Adrian MoserFriend
Messages: 67
Registered: March 2011
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).

Previous Topic:AbstractTable: Dynamic Columns
Next Topic:Is there support for long transactions?
Goto Forum:

Current Time: Fri Oct 09 01:38:36 GMT 2015

Powered by FUDForum. Page generated in 0.01539 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software