cancel
Showing results for 
Search instead for 
Did you mean: 

Table value (selected row) haven't come to Input

Former Member
0 Kudos

Hello expert,

According to my app, I have a page which like this:

When I press the F4 (ValueHelp) the dialog is coming have table and table values are coming from SAP.

And I want, when I press the image input should fill "20004140" like from table.

Here is my example of code :


oTable.addColumn(new sap.ui.table.Column({

            width : '50px', // "80px",

               flexible : false,

               template : new sap.m.Image({

                 height : "40px",

                 src : "image/turkish_airlines.png",

                 // <---------------------- Press Event ---------------------->

                 // register function for press event on the image

                 press : function(oEvent) {

                

                var page4 =  sap.ui.getCore().byId("page4");

                 page4.setBindingContext(oEvent.oSource

                             .getBindingContext());

                

                 var oInput3 = new sap.ui.commons.TextField('oInput3',{

                         value : "{MATERIAL}"

                       });

                

                    var oInput4 = new sap.ui.commons.TextField('oInput4',{

                         value : "{BATCH}"

                       });

                   

                  var ProductId3 = oInput3.getValue();

                var ProductId4 = oInput4.getValue();

                

                  txt_malkod.setValue(ProductId3);

                  txt_parti.setValue(ProductId4);

                

                  oDialog.close();

                

//                          oCreateDialog.bindProperty("title", "MATERIAL");

                    

                

                 }

But there is no value come to my inputs right now. Could you please help me for this?

Regards,

Ogulcan G.

Accepted Solutions (0)

Answers (1)

Answers (1)

karthikarjun
Active Contributor
0 Kudos

Hi Ogulcan,

will this help?

JS Bin - Collaborative JavaScript Debugging

Thanks,

Karthik A

Former Member
0 Kudos

Hello Karthik,

Thanks for your answer,

But couldn't adapted this example to my code. There is an error like: "Cannot read property 'oBindingContexts' of undefined"

Regards,

Ogulcan G.

karthikarjun
Active Contributor
0 Kudos

Hi Ogulcan,

Could you please share your code in JS bin.

Thanks,

Karthik A

Former Member
0 Kudos

Hello Karthik,

Here is my application. I have problem on "pdetiketbasma.view.js"

http://plnkr.co/edit/r6UT3vrAqSt7jaLk0Nq0?p=preview

View(page) is under the button >> 1. Promosyon Depo >> 1. Etiket Basma

Former Member
0 Kudos

And also here is the just view but couldn't run sorry

http://jsbin.com/xijasotuma/edit?html,js,output