Problem with a Prototype

Hello me again, i am writing a prototype for a complex address that is being used here,
http://webix.com/snippet/9b949055

But when i try to use a json to load the data into it i get a error, accesing the fields, any help will be apreciated

Hello,

Your “complexaddress” form is a bit complicated. You can simplify and stabilize it by taking the following steps:

  • Inherit the “complexaddress” widget from UI Form, not UI Layout. By doing this you will get access to Form’s setValues() and getValues() methods. By default Form features padding and border, but you can remove them in defaults:
webix.protoUI({
	name: "complexaddress",
    defaults:{ padding:0, borderless:true }
}, webix.ui.form);

Also, you don’t need to inherit from EventSystem. This mixin is already included into Form as well as into Layout.

  • Use Form’s methods to set and get values of the “complexaddrerss” widget. Don’t forget to provide the name property to its controls.
setValue:function(value){
   this.setValues(value);
}
  • During initial configuration set rows and other configuration settings using the config parameter:
$init:function(config){
    config.rows = [{ view:"fieldset", body:{...}}]
}

Any additional actions you can move to the $ready handler.

Please, check you updated and working snippet: http://webix.com/snippet/6a76db8f