sapui5 - Dynamically Change the path in fragments from controller UI5 -


i have fragment below path : mymodel1>/1/tilecollection want make dynamic controller mymodel1>/n/tilecollection n can 0 1000.

<core:fragmentdefinition xmlns="sap.m"     xmlns:f="sap.ui.layout.form" xmlns:core="sap.ui.core" xmlns:mvc="sap.ui.core.mvc"     xmlns:html="http://www.w3.org/1999/xhtml" xmlns:l="sap.ui.layout">  <page id="master22" showheader="false" enablescrolling="true" >          <tilecontainer       id="container">        tiles="{mymodel1>/1/tilecollection}">          <standardtile               icon="{mymodel1>icon}"           number="{mymodel1>number}"         numberunit="{mymodel1>numberunit}"         title="{mymodel1>title}"         info="{mymodel1>info}"         infostate="{mymodel1>infostate}"          press="handletilepress"/>          </tilecontainer>          </page>  </core:fragmentdefinition> 

json string : when type key 0 , want different set of tiles , when 1 , different tiles....similarly goes on..

[{         "type": "01",         "typekey": "0",   "tilecollection" : [     {       "id-tile": "1ap",       "icon" : "sap-icon://inbox",       "number" : "899999",       "title" : "accounting documents",       "info" : "overdue",       "infostate" : "error",        "press" :  "sayalert"     },     {      "id-tile": "2ap",       "type" : "sap-icon://create",        "number" : "57899",       "title" : "pending invoices",       "info" : "28 days left",       "infostate" : "success"     }]              }, {                 "type": "02",                 "typekey": "1",                  "tilecollection" : [     {       "id-tile": "3ap",       "icon" : "sap-icon://inbox",       "number" : "899999",       "title" : "merchpay idocs",       "info" : "overdue",       "infostate" : "error",        "press" :  "sayalert"     },     {      "id-tile": "4ap",       "type" : "sap-icon://create",        "number" : "57899",       "title" : "pending invoices",       "info" : "28 days left",       "infostate" : "success"     }]                }] 


Comments

Popular posts from this blog

javascript - Create a stacked percentage column -

Optimising Firebase database by automatically overwriting data -

javascript - Angular UI-Grid customTemplate directive causing rows to load slowly/? -