on 04-27-2016 8:36 PM
Hi,
I am using SAP MII 15.0 SP5 version.
Can you tell me how to refresh or reload or update drop down element after executing a dynamic query configured to it?
Regards,
Naga.
Hi Naga,
You are using MII objects to create dropdown. Check if query caching in QT is enabled? If yes, you need to disable it.
I don't think it has anything to do with UI caching as well as data would not be cached along with UI elements. Just a thought.
Regards,
Swaroop
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naga,
I am also facing same issue.
Can you please suggest me how to do that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Naga,
You can try this method.
DropdownBox0_c0c0.addItemsByQuery();
Regards,
Sriram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Sriram,
Thank you for the reply. It gives error.
I did the following ..
$.ajax({
url: '/XMII/Illuminator?QueryTemplate=Test/test.XQry&Content-Type=text/json',
type: 'POST',
data:{'Param.1':plant, 'Param.2':sfc},
success: function(sdata)
{
DropdownBox_c0c0.addItemsByQuery();
}
})
Error: Object doesn't support property or method 'addItemsByQuery'
Regards,
Naga.
Hi Naga,
You are welcome! Best way is to update your model once ajax is updated, same would be reflected in the dropdown you created.
when you say "update dropdown element", do you mean the entire list or one list item in the dropdown?
Let me know how have you instantiated the dropdown.
Regards,
Swaroop
Hi Swaroop,
I want to populate the dropdown list with the output of the Query Test/test.XQry that I executed after passing parameters at runtime.
I created UI dropdown 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(function) I am passing params to the query and executed to populate the result of the query in the dropdown.
$.ajax({
url: '/XMII/Illuminator?QueryTemplate=Test/test.XQry&Content-Type=text/json',
type: 'POST',
data:{'Param.1':plant, 'Param.2':sfc},
success: function(sdata)
{
}
})
Regards,
Naga.
Hi Swaroop,
I tried to use oModel to update as below.But still the drop down is not refreshed with the query result.
Any Help?
$.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);
}
})
Regards,
Naga.
User | Count |
---|---|
12 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.