getView()

Get the specified view of the component instance.

Return=ComponentInstance.getView(ViewName)

Arguments

ViewName—name of the required View.

Return Value

Returnuniface.View object representing the specified view. If the View does not exist or is not valid, returns null.

Creating and Addressing Views

// creating a view
myInstance.createView("myView", "../myapp/view1.html", document.getElementById('mydiv')).then(function (view) {
  // view is created and ready
});

// getting a view 
var view = myInstance.getView("myview");  

// showing a view
myInstance.getView("myview").show("body").then(function () {
  // view is now shown and realized
});

Related Topics