Isolate with protoUI inside protoUI

Howdy.

Snippet: http://webix.com/snippet/2f8bd578

In my app, I’ve been using protoUI successfully to create views that the user can add multiple times. This has been working quite well. It is structured like the ‘func2’ view in the snippet, extending a ui.layout (both rows on the left)

Since I’m starting a new app, I’ve noticed that I have several of these protoUIs and thet have the same basic structure so I decided to create a protoUI for those protoUIs to keep the repeated code to a minimum. These are the ‘splittablepanel’ view with all the common elements and ‘func1’ view with all the component-specific elements (both rows on the right)

Problem: if you try to load data (press the refresh icon in the header) in the lower row of the right col (func1), the data will be added to the top row. If you scroll the bottom row, the top row will scroll. I believe this is an isolation issue or something like id collisions.
This does not happen on the left cols. Each row added it’s own data without problem.

Can anyone spot the problem? I have no problem using the old structure again but I’d rather keep repeated code to a minimum if possible.

Hello,

It is safer to work with object copies or use a function to return a new object. If the same object is used to initialize multiple views, the result can be far from desired - view initialization changes config options.

So, you can use either an object copy:

webix.copy(tPanel.config_content)

http://webix.com/snippet/235eebe2

or a function

http://webix.com/snippet/35f1d781

Seems to be working as intended. Much appreciated.