-
-
Save apetrov/6316d9abf5f09fd1df20 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sap.ui.controller("controller.BehaviorAllPages", { | |
onInit: function() { | |
this.loadReportData(); | |
}, | |
onBeforeRendering: function() { | |
}, | |
onAfterRendering: function() { | |
}, | |
onExit: function() { | |
}, | |
loadReportData: function() { | |
//this.getView().byId("allPages").setBusy(true); | |
this.aModel=new sap.ui.model.json.JSONModel(modelUrl); | |
var tableChart = this.getView().byId("tableChart"); | |
tableChart.setModel(aModel); | |
tableChart.bindRows("/"); | |
}, | |
modelUrl: function(){ | |
var dateRangePicker = this.getView().byId("selectDateRange"); | |
var dateFromUnformated = dateRangePicker.getDateValue(); | |
var dateToUnformated = new?Date(dateRangePicker.getSecondDateValue().getTime() + 86400000); | |
var url = "/warp/web/model/BehaviorAllPages.xsjs?"; | |
url+= "from="+dateFromUnformated.getFullYear() + "-" + (dateFromUnformated.getMonth() + 1) + "-" + dateFromUnformated.getDate(); | |
url+="&"; | |
url+="to="+dateToUnformated.getFullYear() + "-" + (dateToUnformated.getMonth() + 1) + "-" + dateToUnformated.getDate(); | |
return url; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment