javascript - sapui5 - Two master pages -


i've got 2 master pages dynamic lists.

master page 1:

<page title="title" showbackbutton="true" id="master1">     <list id="idlistauctions" mode="singleselectmaster" select="onpressgotomaster2" items="{auctions>/auctionsglobal/0/auctionstypes}">         <items>             <standardlistitem title="{auctions>auctiontype}" type="navigation" />         </items>     </list> </page> 

master page 2:

<list id="idlistauctionsdetail" mode="singleselectmaster" select="handlelistselect"             items="{auctiontypes/auctions}">     <items>         <standardlistitem>           <!-- output items master page 1 -->         </standardlistitem>     </items> </list> 

my javascript:

onpressgotomaster2 : function(oevent) {     console.log( oevent.getparameter("listitem").getbindingcontext() ); //undefined     this.byid("hdcsplitapp").tomaster(this.createid("master2"),'slide', oevent.getparameter("listitem").getbindingcontext()); }, 

my json file:

{     "auctionsglobal": [{         "auctionstypes": [{             "auctiontype": "delivery",             "auctions": [{                 "auctionid": "12345"             }, {                 "auctionid": "54321"             }]         }, {             "auctiontype": "contract",             "auctions": [{                 "auctionid": "98745"             }, {                 "auctionid": "56478"             }]         }]     }] } 

i want display items selected "auction" master1 on master2 page. there seems no data on master2. i've tried don't it.

since using named model binding list, model name should passed getbindingcontext argument.

further, use setbindingcontext set binding context of list second master page context obtained getbindingcontext.

here working example.


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -