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 11:01 Go to next message
Beat Schwarzentrub is currently offline Beat Schwarzentrub
Messages: 43
Registered: November 2010
Member
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 16:06 Go to previous message
Adrian Moser
Messages: 67
Registered: March 2011
Member
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
Previous Topic:AbstractTable: Dynamic Columns
Next Topic:Is there support for long transactions?
Goto Forum:
  


Current Time: Mon Sep 01 14:47:46 EDT 2014

Powered by FUDForum. Page generated in 0.01766 seconds