Skip to Content
0
May 29, 2015 at 08:45 AM

Q: UI5 Display Form from another view?

21 Views

Hey there,

I am having a little trouble constructing a view that has the tabBar component where each tab includes a form component.
Something like this (some alien language for you there ๐Ÿ˜Š ):

And as you see, I have a quite a number of tabs (and and therefore a quite a number of forms) and as I was getting 700+ lines of code already with the forms of the first two tabs in one view, I decided to chop the code into pieces.

What I did was that I took the form component code of one tab into a separate file (containing the form component only) and then wanted to bring it to the main view by

new sap.m.IconTabFilter({
                    icon: "sap-icon://contacts",
                    text: "Põhiandmed",
                    design: "Horizontal",
                    content: sap.ui.getCore().byId("FormTab1") //TRYING TO GET THE FORM 
                }

But sadly, the outcome :

So, as my idea of asking the form by sap.ui.getCore.byId() is not so eager to work I was thinking that maybe you guys can help me out - how can I get the form from another view/file to show in a certain view?

Thanks,
Mario.

Attachments

Capture.PNG (18.3 kB)
Capture2.PNG (16.5 kB)