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

Triggering the customer component multiple times

edited Apr 15, 2019 11:20AM in Visual Builder 2 comments

Summary

Triggering the customer component multiple times

Content

Hi,

When i am using custom component by default it is triggering the default constructor and rendering . But when any event happens on the rendered page how to handle in custom component  through jquery where i want to define specific methods.

Attached code snippet.

Version

18.x

Code Snippet

define(['knockout', 'resources/js/blank','jquery','ojs/ojcore'], function(ko,blank,$) {
  'use strict';



 function ComponentModel() {
   
     var self = this;
  
   // self.composite = context.element;
   self.messageText = ko.observable("Prasad");
   
   this.messageText = ko.computed(function() {
     var test="";
     var content="";
     var urlStringHeader ='https://ejjq-dev1.fa.us2.oraclecloud.com:443/km/api/latest/content/9B98350779C4464E9FE036793F895185';
     	  alert('test');
	   $.ajax({

      url: urlStringHeader,
      async: false,
      cache: false,
      headers: {

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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