Expand my Community achievements bar.

OptionsProvider in widget not returning my data

Avatar

Level 4

I have a script returning the list of users in the system. The list is returned as JSON. It's working fine.

But, when I define a select widget, and I want to retrieve the data, through an optionsProvider, my dropdown list is empty, with no errors whatsoever in the browser console.

// Participant's Name this.participant = new CQ.form.Selection({ fieldLabel: "Name", fieldDescription: "Name of the participant filling out this role.", anchor: "100%", type: "select", optionsProvider: "function(path, record) {return CQ.Util.formatData(CQ.HTTP.eval(CQ.HTTP.noCaching('/apps/cca/components/utils/cca-selectusers.list.json')));}", listeners: { selectionchanged: { scope:this, fn: this.updateHidden } } });

 

So, I'm wondering, is there anything wrong with my code? is this the correct way to declare an optionsProvider?

Thank you

0 Replies