where is the declaration of parameters in listeners functions [extjstraining] | Community
Skip to main content
New Participant
October 16, 2015
Solved

where is the declaration of parameters in listeners functions [extjstraining]

  • October 16, 2015
  • 1 reply
  • 562 views

I am learning Using and Extending Widgets referencing to http://dev.day.com/docs/en/cq/current/developing/widgets.html.

We can define js functions in listeners. Then my question is: where is function parameter defined? Like loadcontent="function(field,rec,path){Ejst.x2.showInfo(field,rec,path);}" , this function will be triggered when conent load, but what are values of "field", "rec", "path"? I cannot find where "field", "rec", "path" are defined. Are they just arbitrary names which i can change as i wish? (I believe this is not the case). 

So would someone help? 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Sham_HC

You should look at xtype widget you are using & document has all the details.  In your example using selection widget so details at  http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.Selection

In fact you can use any arbitrary name does not matter as long as inside the implementation same attribute is used.

1 reply

Sham_HC
Sham_HCAccepted solution
New Participant
October 16, 2015

You should look at xtype widget you are using & document has all the details.  In your example using selection widget so details at  http://dev.day.com/docs/en/cq/current/widgets-api/index.html?class=CQ.form.Selection

In fact you can use any arbitrary name does not matter as long as inside the implementation same attribute is used.