on 04-28-2016 4:41 AM
Dear Experts,
I have a requirement in which i am using sap.m.select control and the items should get bind to it , should happen when i click the arrow button
which comes in sap.m.select.
In other way on clicking of the drop down , an oData has to be fired and the item aggregation has to happen on success of the odata call.
I checked there is only one event change , which usually fires when we change the item selection.
Please help me on this to achieve this functionality.
Regards,
Vikash
Hello All,
I have solved the requirement by extending the sap.m.Select Control
Created one file select.js and wrote the following code:
sap.ui.define([
"sap/m/Select"
], function(select) {
//jQuery.sap.declare("vikash.select");
var customSelect = select.extend("vikash.select", {
metadata: {
events: {
"click": {}
}
},
onclick: function() {
this.fireClick();
},
renderer: {},
onAfterRendering: function() {
if (sap.m.Select.prototype.onAfterRendering) {
sap.m.Select.prototype.onAfterRendering.apply(this, arguments);
}
}
});
return customSelect;
});
in controller i called the path
sap.ui.define([
"vikash/select"
and in view as
xmlns:customselect="vikash"
<customselect:select selectedKey="{FailureCode}">
<core:Item key="{FailureCode}" text="{FailureText}"/>
</customselect:select>
Hope this helps others
Regards,
Vikash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.