My requirement is to set a F4 value help to one of the columns in a table. I built the F4 help with a fragment and also succeeded to get the data in that view.
Now when I click and trying to set the value to the ID of the column, it throws me the error:
Uncaught TypeError: Cannot read property 'setValue' of undefined.
Build Table in controller using JS
this.oEditableTemplate = new sap.m.ColumnListItem({
highlight: "{TimeData>highlight}",
cells: [
new sap.m.Input("input_assisted1", {
// ...,
showValueHelp: true,
valueHelpRequest: [this.onSearch, this],
}),
// ...
]
});
Below is the callback function called while closing the F4 dialog box:
onValueHelpClose: function (oEvent) {
var wbsElement = oSelectedItem.getBindingContext().getObject().WbsElement;
this.inputId = oEvent.getSource().getId();
this.byId(this.inputId).setValue(wbsElement); // <-- error
// also tried: this.byId("Input_Assisted1") but same error.
},