Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

JSON file Data Binding in MVC application desgin

$
0
0

Hi Experts,

 

I have created an application by following MVC guidelines.

 

  1. I created a view, which includes the needed UI elements like application header and Table, I used matrix layout as the layout pattern of the view. View type is JS.
  2. I maintained the needed action handlers in the Controller file, Just to inform you there is only one action handler onClick_Logoff. This function just displays an alert.
  3. The Index file I left it as it is.I've not changed anything.
  4. I have imported a JSON file which includes Product Category Information. I am looking to maintain binding between this file and Table which is placed in the View.
  5. I could instantiate JSON model in the INIT:Function() of controller.

 

Now the challenges which I am facing are:

 

  1. How to get the reference of table with in the Controller. I tried to use SAP.UI.getCore().byID();. But unsuccessful.
  2. How to get or link the JSON data file in the Model.
  3. How can I bind the columns of the table with fields available in the JSON data file.

 

Please find the screenshots for more information.

 

app_stru.JPG

 

app_index.JPGapp_ctrl.JPGapp_view.JPGapp_view2.JPGPC_datajson.JPG

app_output.JPG

 

Regards

Pavan

 

Message was edited by: Pavan Bhamidipati

 

Message was edited by: Pavan Bhamidipati

 

Message was edited by: Pavan Bhamidipati


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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