Skip to Content
0
May 20, 2016 at 08:39 AM

SAP Ui5 Databinding question sap.m.table with helpdialog

47 Views

I have an sap.m.table based on a Json model.

One of the columns contains an input field where the user can assign a User Id.

Therefore the user should select die ID from a helpdialog where all existing id are listed.

My Problem lies at the selected item event from the helpdialog.

There i get the Id the user as selected but i dont know how to assign the Id to the appropriate field in the table.

The event in the selection doesn't know the inputfield which triggered the dialog.

Is there a way?

items : {

path : "/ActionItems/",

template : new sap.m.ColumnListItem({

wrapping : true,

textAlign : sap.ui.core.TextAlign.Begin,

type : "Active",

cells : [

new sap.m.Input( type : sap.m.InputType.Text,

maxLength : 100,

editable : true,

value : "{/RaisedBy}",

change : function(oEvent) {

path = oEvent.getSource().getBindingContext().sPath + "/UpdateFlag";

oEvent.getSource().getModel().setProperty(path, "true");

},

valueHelpOnly : true,

showValueHelp : true,

valueHelpRequest : function(oEvent) { }

} oValueHelpDialog.bindAggregation("items", "/FindUsersB1", oItemTemplate);

// attach close listener

oValueHelpDialog.attachConfirm(function (oEvent) {

var selectedItem = oEvent.getParameter("selectedItem");

if (selectedItem) {

});

}

// attach cancel listener

oValueHelpDialog.open();

Regards.

Dirk