1.activity Jump: By adding a Windowdialog object to the page, the SRC attribute binds to the open page. The open operation is performed through the Windowdialog object's open () method. Jump to the sub-page can be This.owner () to get the main page of the Windowdialog object, get to the object can be passed through the object's send (data) method to pass the information back and forth.
2. Jump Shishun: You can pass parameters at the same time by opening the jump page by winddowdialog the Open () method of the object. has reached the same jump action to achieve different effects, such as new and modified.
function (event) { this. Comp ("WindowDialog1"). Open ({ params: { ' new' } }); }; function (event) { var row = event.bindingcontext. $object; This is a template code that can be obtained automatically via the ListRow + hint key (ALT +/). this. Comp ("WindowDialog1"). Open ({ params: { ' edit ', rowdata: Row.tojson () } ); };
3. The jump page gets the parameters in the jump action from the main page, as well as the system auto-generated ID properties when added.
Model.prototype.modelParamsReceive =function(event) {vardata = This. Comp ("Accountdata"); Data.clear (); if( This. Params.operator = = ' new '{data.newdata ({//) This is a template code that can be obtained automatically via the newdata+ prompt key (ALT +/). "Defaultvalues" : [ { "FId": Justep. Uuid.createuuid (),//Note whether the field is the same as the table field. "Fcreatetime":NewDate ()}] }) }Else{data.loaddata ([ This. Params.rowdata]); Receive JSON data Data.first (); } };
4. Save the modified data to the database, or the data will be refreshed once in the browser. In the Windowdialog onreceived event, the save operation means that the event is called after the mapping is complete.
function (event) { this. Comp ("Accountdata"). SaveData (); };
Mapping settings for 5.windowdialog. Match the data of the main page and the popup page by adding a map.
Bookkeeping (Windowdialog)