Expand my Community achievements bar.

SOLVED

Update options provider of selection widget in multi type

Avatar

Level 4

Hi ,

  I have created a multi type widget which has a fieldconfig of xtype selection . optionsprovider property is defined which has a java script function as a value to load the drop down with values . This is all fine at my end and my drop down works as expected .

Now as a new requirement , I had to add a path field to the dialog and on change of value in path field , i need to re populate my drop down with new values based on path selected . 

I'm trying to achieve this by adding a dialogcloselistener which would execute a script . In the script i'm getting hold of my multiwidget field . My idea is that from this multi field widget i can get hold of selection widget an call setOptions on it to reload  , but it doesn't seem to work . I had also tried something as  setOptionsProvider but this too doesn't work ? Any pointers on how I can achieve it? Which function should I be calling ? My function which i'm adding to dialog close listener is below ,

 

function(){  

      var componentDialog = this.findParentByType('dialog'); 

      var selectedPath = this.value; 

     var multifield = componentDialog.getField("./multi");

    var obj =  multifield.findByType('ejstcustomxx');

    console.dir(obj.optionsProvider);

   var selectedPath = 'this.value';

 /**  here i'm trying  obj.optionsProvider or obj.setOptions () , for both it complains that they are undefined ..

  obj.setOptions (call custom  function with selected path );

 

Thanks for your help

1 Accepted Solution

Avatar

Correct answer by
Level 10

Did you looked at oob page properties cloud config dialog implementation?

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Did you looked at oob page properties cloud config dialog implementation?

Avatar

Level 4

Thanks for your pointer . I haven't looked at it . I will check now and see if I can get reference to suit my use case . Will post an update on how things go .