on 06-05-2019 6:04 AM
hi Guys,
I have an application with an Price Basis Input , which is a value help.
some times i get error as shown below & value help is empty. i.e. if application is launched 10 times, then 4 to 5 times i get the below error , where i have to log off , then login again and reload the application and then the value help works.
Please help to resolve.
Uncaught TypeError: Cannot read property 'aKeys' of undefined
at f.d.update (eval at evalModuleStr (jquery.sap.global-dbg.js:3470), <anonymous>:2138:424)
at f.PriceBasisValueHelp (PriceBasis.controller.js?eval:167)
at f.a.fireEvent (EventProvider-dbg.js:228)
at f.a.fireEvent (Element-dbg.js:427)
at f.fireValueHelpRequest (ManagedObjectMetadata-dbg.js:428)
at f.eval (eval at evalModuleStr (jquery.sap.global-dbg.js:3470), <anonymous>:2265:351)
at f.a.fireEvent (EventProvider-dbg.js:228)
at f.a.fireEvent (Element-dbg.js:427)
at f.firePress (ManagedObjectMetadata-dbg.js:428)
at f.c.<computed> [as onclick] (eval at evalModuleStr (jquery.sap.global-dbg.js:3470), <anonymous>:282:130)
hi Fabrice Podevin ,
Please find the below code.
PriceValueHelp:function()
{
var l_inputId_PriceInput = g_PriceViewPointer.getView().byId("Price_INPUTID");
var oValueHelpDialog_Price = new sap.ui.comp.valuehelpdialog.ValueHelpDialog({
basicSearchText: l_inputId_PriceInput.getValue(),
title: "Price",
modal: true,
supportMultiselect: false,
supportRanges: true,
supportRangesOnly: false,
key: "Price",
descriptionKey: "Description",
ok: function(oControlEvent) {
var oContext = oValueHelpDialog_Price.getTable().getContextByIndex(oValueHelpDialog_Price.getTable().getSelectedIndex());
if(oContext)
{
var oselected = oContext.getModel().getProperty(oContext.getPath());
sap.ui.getCore().getEventBus().publish("price_basis_exchange", "data", oselected);
var selectedPrice = oselected["INC_CDE"];
g_PriceViewPointer.getView().byId("Price_INPUTID").setValue(selectedPrice);
}
oValueHelpDialog_Price.close();
},
cancel: function(oControlEvent)
{
sap.m.MessageToast.show("Cancel pressed!");
oValueHelpDialog_Price.close();
},
afterClose: function()
{
oValueHelpDialog_Price.destroy();
}
});
g_PriceValueHelpDialog = oValueHelpDialog_Price ;
var oColModel = new sap.ui.model.json.JSONModel();
oColModel.setData({
cols: [
{label: "Price", template: "INC_CDE"},
{label: "Description", template: "INC_DESC"}
]
});
oValueHelpDialog_Price.getTable().setModel(oColModel, "columns");
var oRowsModel = g_PriceViewPointer.getView().getModel("PriceModel");
oValueHelpDialog_Price.getTable().setModel(oRowsModel);
oValueHelpDialog_Price.getTable().bindRows("/PRICE_BASIS_LIST");
oValueHelpDialog_Price.setFilterBar(new sap.ui.comp.filterbar.FilterBar(
{
advancedMode: true,
filterItems: [new sap.ui.comp.filterbar.FilterItem({ label :"Price Basis" , name: "Price Basis", control: new sap.m.Input("price_basis_filter_input")})],
search: function()
{
g_PriceInput = sap.ui.getCore().byId("price_basis_filter_input").getValue();
g_PriceViewPointer.getPriceValue(g_PriceInput);
sap.m.MessageToast.show("Search pressed");
}
}));
oValueHelpDialog_Price.open();
oValueHelpDialog_Price.update();
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
10 | |
9 | |
6 | |
6 | |
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.