Remove Navigator

Hi all

Is there any way of adding/removing a form navigator at runtime?

Best regards. Roberto Blasco.

Hi Roberto,

There is no real ‘runtime’ function or property to change the navigator on a form. You can only do this in ‘designtime’. This also means you can do it with the SolutionModel.
Just look at the sample code under the Navigator property in the JSForm class.

Hope this helps.

Hi Roberto,

there are no real runtime controllers, but you can use the solutionModel to do this and call controller.recreateUI() afterwards.

var _oForm = solutionModel.getForm('myForm');
if(_oForm) {
_oForm.navigator = SM_DEFAULTS.NONE;
forms.myForm.controller.recreateUI();
}

Hope this helps

Looks like Roberto needs the solutionModel to do this :-)

If we give the same answer at the same time it MUST be true. ;)

Thanks mboegem, ROCLASI

var _oForm = solutionModel.getForm('myForm');
if(_oForm) {
_oForm.navigator = SM_DEFAULTS.NONE;
forms.myForm.controller.recreateUI();
}

Does ‘myForm’ need to be created through Solution Model or can I use an existing form?

Best regards. Roberto Blasco.

solution_model_navigator.servoy (4 KB)

Hi Roberto,

You can use the SolutionModel on either manually (i.e. existing) created or SM created forms. In the end they are all the same kind of objects.