Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3132

How to pass a value from one view to another using a button?

$
0
0

HI,

 

I am a newbie in UI5, I am following MVC method  to develop a simple application in UI5.I have made a list and made its contents clickable, and it is redirecting me to another view/page.Now , I want to fetch the details from 1st view to the 2nd.

I am fetching the data from JSON model that I have created.

This is the portion of code that I have written in the 1st view:

 

createContent : function(oController) {

      

        var list = new sap.m.List({

              items:{

                  path:"/Product",

                      template: new sap.m.ObjectListItem({

                        

                           title:"{Product Name}",

                           number:"{Price}",

                           intro:"{Plant}",

                           icon:"{image}",

                           type : "Active",

              

                                

        attributes: [

                    {

            text:"{Product ID}"

                    },

                    {

               text:"{value}"

                    }

        ],

      

      

      

        firstStatus: {

      

            text:"{Status}"

                     },

                    

                      press: function()

                      {

                          app.to(page1);

                  

                      }

                      })

       

            

              }

      

      

        });

 

screen.png


Viewing all articles
Browse latest Browse all 3132

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>