This has possibly been discussed over and over, but I can not get it to work, so...
On a DynamicForm, I would like to change the form item used for some of the fields. (I want to replace them with a StaticTextItem to make it read-only.)
By default, the form items are derived from the bound DS.
Setting type (with FormItem.setType()) on fields returned by getFields() does not seem to do anything.
Calling setEditorType() on the FormFields throws an exception.
Manually re-creating all the changed FormItems, and then calling setFields() works, but causes ID collision problems later on. (See here: http://forums.smartclient.com/showthread.php?t=5430 )
I do not want to touch the DataSourceFields, since the modifications I want to do are only relevant to the current DynamicForm,
not all users of the DataSources.
Which one is the right solution?
On a DynamicForm, I would like to change the form item used for some of the fields. (I want to replace them with a StaticTextItem to make it read-only.)
By default, the form items are derived from the bound DS.
Setting type (with FormItem.setType()) on fields returned by getFields() does not seem to do anything.
Calling setEditorType() on the FormFields throws an exception.
Manually re-creating all the changed FormItems, and then calling setFields() works, but causes ID collision problems later on. (See here: http://forums.smartclient.com/showthread.php?t=5430 )
I do not want to touch the DataSourceFields, since the modifications I want to do are only relevant to the current DynamicForm,
not all users of the DataSources.
Which one is the right solution?
Comment