I'm trying to use Smart field in my new XML view without Smart filter bar in SAPUI5. I want to display this after press F4 like it is in Smart filter bar: Printscreen
I've already initialized OData service in my controller.js:
onInit: function() {
var oModel, oView;
oModel = new sap.ui.model.odata.ODataModel("<serverURL>/sap/opu/odata/sap/ZACTIONS_SRV/", true);
oModel.setCountSupported(false);
oView = this.getView();
oView.setModel(oModel);
},
And this is my XML view:
<form:content>
<smartField:SmartLabel labelFor="Applctn"/>
<smartField:SmartField value="{Applctn}" id="Applctn"/>
</form:content>
But I get this error in Chrome and no Smart field is displayed. Error
Try this piece of code
$('yourControl').bind('keydown', function(e) {
if (e.keyCode == 115) {
// your statement to open goes here
}
});
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.