Hi,
Is it possible access inherited fields (in a child form) in solution model?
I can´t get it with
var vForm = solutionModel.getForm(_formname_);
var vField = vForm.getField('inherited_field_name');
Is there another way?
Thanks in advance.
Hi,
Is it possible access inherited fields (in a child form) in solution model?
I can´t get it with
var vForm = solutionModel.getForm(_formname_);
var vField = vForm.getField('inherited_field_name');
Is there another way?
Thanks in advance.
Inherited fields aren’t part of the childform in the solutionModel, they are part of the parent form (just like they are in Servoy Developer).
Through the solutionModel, you can access the parent form using the extendsForm property on the JSform.
Note that if you change anything on that parent form through the solution model, it goes into effect for all forms that inherit from the parent form!
Paul
But in runtime they “seems” be part of the child form. If I set for example a backgorund image of a label it only change for the the current child form, not for all the child forms.
Because of this I thought that they are part of the child form… So how does it works? how do you controll the different properties in the childs?
victor.rojo:
But in runtime they “seems” be part of the child form. If I set for example a backgorund image of a label it only change for the the current child form, not for all the child forms.
Because of this I thought that they are part of the child form… So how does it works? how do you controll the different properties in the childs?
What you want here is not (yet) supported. We may add property override functionality in next major release (Servoy 6.0). Property override means you can override a property from inherited element so the value is only for child form (and not all child forms). Until this is implemented, see above post from Paul about how it works now.