Change View

Hi,

I am using webix MVC and in the $ui of a view, I have following like code.
$ui:(function(){
if(condition)
return abc;
else
return xyz;
}

All I want to do is, on the condition change, my view should again check the condition and regenerate view.

Thanks

Redefining of the entire subview is not so handy. So if you want to to redraw the view on change of some value, still the best way is to use different URLs for the different combination of widgets.

For example, in case of a toggle somewhere in the top view:

{ 
	view:"toggle", id:"toggle", . . . ,
	on:{onChange:function(){
		var condition = this.getValue();
		if (condition) {app.show("/top/page1")}
		else {app.show("/top/page2")};
	}}
},