title: NativeScript UI-Builder
body: <p>I try to build a simple form-like UI where I want to dynamically add rows of multiple TextFields. I built a custom component with XML and JS, because there is some interaction in these TextFields (start, end, duration). </p>
  
  <p>I am a starter in NativeScript, but I got my databinding and event-structure going. I was able to add my custom component via ui/builder. Where I am totally stuck is getting "options/arguments" to this component-instance.
  What I try to accomplish is: Adding my custom component and giving it some data which should be filled into the components Obsverable. At a later (save) action I want to be able to retrieve these data from my "main" view.</p>
  
  <p>My structure is something like this:</p>
  
  <p>main.js</p>
  
  <pre><code>exports.loaded = function(args) {
      var page = args.object;
      page.bindingContext = model;
  
      var outerContainer = page.getViewById('outerContainer');
  
      var vma = builder.load({
          path: 'widgets/durationRow',
          name: 'durationRow'
      });
  
      outerContainer.addChild(vma);
  };
  </code></pre>
  
  <p>custom component "durationRow.js"</p>
  
  <pre><code>var componentModel = new Observable({
      label:      "",
      start:      "",
      end:        "",
      duration:   ""
  });
  
  exports.onLoad = function(args){
      var container = args.object;
      container.bindContext = componentModel;
  };
  </code></pre>
  
  <p>I tried to export the componentModel via exports.componentModel and address vma.componentModel from main. But vma is a view not the "JS-module".
  I am really stuck and didn't find any example doing something like my scenario. </p>
  
  <p>Can anyone point me in the right direction how I can do this stuff the right (or any) way? </p>
  
  <p>thanks!</p>