Expand my Community achievements bar.

SOLVED

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

Avatar

Level 2

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? 

1 Accepted Solution

Avatar

Correct answer by
Level 10

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 10

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.