Bookkeeping (Windowdialog)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.