Hi maybe sameone could healp me. Im trying to get data from Popup window but i get this error : Cannot read property 'getValue' of undefined
Popup view:
<Dialog
title="Maršrutas"
class="sapUiPopupWithPadding" >
<Input
id="start"
editable="true"
value=""
maxLength="80"/>
<Input
id="end"
editable="true"
value=""
maxLength="80"/>
Maps.controller:
onOpenDialog: function (oEvent) {
if (! this.oDialog) {
this.oDialog = sap.ui.xmlfragment("view.Dialog", this);
this.getView().addDependent(this.oDialog);
}
this.oDialog.open();
},
calcRoute: function() {
var start = this.getView().byId("start").getValue();
var end = this.getView().byId("end").getValue();
var request = {
origin:start,
destination:end,
travelMode: google.maps.TravelMode.DRIVING
};
directionsService.route(request, function(response, status) {
if (status == google.maps.DirectionsStatus.OK) {
directionsDisplay.setDirections(response);
}
});
}
I try different combinations to get inputs values but nothing happens.
Please help