Skip to Content
avatar image
Former Member

SAPUI5 - Link input field -> pass to oData key tab


I would need help with getting a value from an input field to the oData query in the key tab to select data from the backend based on the input field. What I have now is this scenario: I have an input field on master1 view and and a button. When pressing the button, I navigate to master2 and on master2 I should display the list of orders selected from the backend. Currently it works so that the query method is called but the key value from the input field is not transferred, so I am missing the part in between. Where can I pass the input value?

I get the value from my input field controller for master1,js and navigate to master2:

 onSearchOrders : function(oEvent) {
 var SoldTo = this.getView().byId("SoldToInput");
   this.getRouter().navTo("master2", {
   from: "main",
   entity:"1" })

In master2.js I have defined the path to get the sales orders from backend:

var sEntityPath = "/SalesOrderHdrSet";
var oEventBus = this.getEventBus();
var that = this;
this.byId("master2List").attachUpdateFinished(function() {
  oEventBus.publish("Master2", "LoadFinished", {
  oListItem: that.getView().byId("master2List").getItems()[0]

bindView: function(sEntityPath) {
		var oView = this.getView();
	//Check if the data is already on the client
		if (!oView.getModel().getData(sEntityPath)) {
	// Check that the entity specified was found
	oView.getElementBinding().attachEventOnce("dataReceived", jQuery.proxy(function() {
	var oData = oView.getModel().getData(sEntityPath);
			}, this));
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

0 Answers