callEvent

calls an inner event

boolean callEvent(string name,array params);
namestringthe event name, case-insensitive
paramsarraythe array of the event parameters
booleanfalse, if some of the event handlers return false. Otherwise, true

Example

{
  view:"form",
  elements:[
    { view:"text", name:"fname" },
    {
      view:"button", value:"Add a field", click:function(){
 
        var form = this.getFormView();
        var fields = Object.keys(form.elements).length;
 
        form.addView({
          view:"text",
          name:"field_" + webix.uid()
        },fields);
 
        form.callEvent("onAfterFieldAdded", [ ++fields ]);
      } 
    }
  ]
}

Details

Normally, events are called automatically and you don't need to use this method.

See also
Back to top
Join Our Forum
We've retired comments here. Visit our forum for faster technical support, connect with other developers, and share your feedback there.
If you have not checked yet, be sure to visit site of our main product Webix best ui framework and page of ui layout product.