Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3167

update dropdown box after Ajax call

$
0
0

Hi,

 

I created a dropdown control in my application as below.

 

var dropdown_c0c0 = new com.sap.xmii.ui.UIElementDropdownM({

dataStatic:"false",

dataDynamic :"true",

keyValueList :"",

queryPath:"Test/test.XQry",

keyColumn:"wc",

valueColumn:"wc",

defaultValue:"",

colSpan :"2",

rowSpan :"1",

topPosition :"1",

leftPosition :"7",

controlVisible :"true",

controlEnabled :"true",

textSize:"12",

controlId: 2,

onSelect :"",

onInitialize :""});

form_c0c0.add(dropdown_c0c0);

 

on event,  I passed parameters to the query Test/test.XQry  which is attached to the dropdown and executed the query using Ajax. I want  to populate the result of the query in the dropdown after Ajax call.

 

$.ajax({

                    url: '/XMII/Illuminator?QueryTemplate=Test/test.XQry&Content-Type=text/json',

                    type: 'POST',

                     data:{'Param.1':plant, 'Param.2':sfc},

                    success: function(sdata)

                    {                     

                         var oResult = sdata.Rowsets.Rowset[0].Row;

                        var abc = [];

                        abc.push(oResult[0].wc);

                      

                        var oModel = new sap.ui.model.json.JSONModel();

                        oModel.setData(abc);

                        dropdown_c0c0.setModel(oModel);

 

                     

                    }

})

 

But still the dropdown is not updated. Any help will be appreciated.

 

Regards,

Naga.


Viewing all articles
Browse latest Browse all 3167

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>