how to use $$ to find elements from a window webix-ready root param

I would like to use $$ to find elements from a window webix-ready root param, in the same vein as seen in http://docs.webix.com/desktop__angular.html for config:

<body ng-controller="webixTestController">
    <div webix-ui="config" webix-ready="doSome(root)"></div>
</body>
app.controller("webixTestController", function($scope){
    $scope.doSome = function(root){
    var list = root.$$("a1"); //referring to list via root object
    var template = root.$$("a2"); //referring to template via root object

In my code below I am not getting $$ available on root (the latter correlates to the window itself). That’d be ideal as I have got dom elements with the same id on other windows. Any fix or alternative you can think of?

<div webix-ui view="window" id="addRecipientsWindow" 
position="center" modal="true" height="700" width="900" move="true" 
webix-ready="addRecipientsWindowReady(root)">
[controller]
function addRecipientsWindowReady(root) {
//  unfortunately root.$$ is not available here
}

Hi,

The root.$$ works only when you are working with isolated layout ( isolate property set on top level )

You can mimic the same behavior by subclassing window. Code like next

webix.protoUI({
  name:"iWin"
}, webix.ui.window, webix.IdSpace);

Will allow to use view:“iWin” which will work the same as normal window, but will have an isolate property similar to layout ( and as result root.$$ will work for it )

http://webix.com/snippet/8f8d3399

ok cheers for that, the concept is now understood. Closely related to this I have also posted a more focused question about how to achieve this in markup, as all my windows and their content are initialized exclusively in markup - could you please have a look?
http://forum.webix.com/discussion/7843/isolate-window-ids-via-markup-init-as-opposed-to-js-init#latest

The solution is the same, the protoUI command will create a new ui type, which can be used both from a config and from a markup

webix.protoUI({
  name:"iwin"
}, webix.ui.window, webix.IdSpace);
...
<div webix-ui view="iwin" position="center" 

http://webix.com/snippet/496e5f0b

Missing “isolate” on a window is a miss from our side, so it will be added in 4.1