You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Calling fire custom event from customer component

edited Apr 12, 2019 11:50AM in Visual Builder 1 comment

Summary

Calling fire custom event from customer component

Content

Hi,

Could you please let us now how to call the fire custom event from custom component.

Please find attached code snippet for reference.

 

With Regards,

Eswar.

Version

18.x

Code Snippet

function ComponentModel(context) {
    var self = this;
    self.composite = context.element;
    //Example observable
    self.messageText = ko.observable('Hello from Example Component');
    
    alert("Before Component raised custom event");
    this.eventHelper = context.getEventHelper();
    this.eventHelper.fireCustomEvent("restCallCustomEvent", "");
    alert("Component raised custom event");


  } 

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!