im trying to add a tab with the solution model but i cant make it work
i have a form with an empty tab panel and i want to put a form in a new tab there…
my code is the following
var form = solutionModel.getForm('principal')
var tab = form.getTabPanel('tab')
var form2 = solutionModel.getForm('clientes')
var t = tab.newTab('tab1', 'Nombre', form2)
application.updateUI()
i tried it putting a form in the tab panel and doesnt work either… is this the proper use or am i forgetting something??
create a form with the solution model. It includes header, body and footer, tab panel on the footer with second form on it. Since there is no documentation available so far, all I can tell comes from my experience and answers I read an received in the forum
extend a form created with form designer with dynamic button bar.
I guess from your code, that you try to extend an existing form (‘principal’), created with the form designer, dynamically. By using the solution model you try to add a second form (‘clientes’) to a tab panel on the first form.
As far as I know, a form can either be created completely dynamically or extended dynamically as long as it is not used/accessed/created in Servoy (before first time onShow?). Even history.removeForm(formName) and solutionModel.removeForm(formName) do not help later. So I guess you have to find the right place in code to place your extension.
My code, to place a form on a tab panel, is the same as yours. The only difference I can see is, that I create both forms dynamically.