Two buttons share an interface and click the interface save button to invoke different events

Source: Internet
Author: User

The first scenario: Add Modify Common Window

The new is to create the model loaded into the pop-up form, Sysid is empty (Sysid is a string of characters generated when the record is saved, obtained by Sys_guid (). When editing the grid option loaded into the pop-up form, the record is already present so sysid is not empty, and then it is determined by the edit window when the Save button click is called New or modified.

Second case: Batch production of primary secondary card

Unlike the new and modified shared Windows, when the card is created, the grid selects the card information and the form's model in the Create Card window is not the card information but the batch business card number of conditional data, so can not be generalize with the new modification.

For example, new primary and secondary cards, the main card does not need the card information other than the parameters, and the secondary card needs to obtain the primary card information. Do not know how to think of a more stupid method, that is, when you click on the main card to clear the grid has been selected, click on the increase of the card when the request must have the option, in order to determine whether there are options in the grid to distinguish between the creation of the main card or the secondary card. Here's how to empty the grid's selected state:

Gridpanel.getselectionmodel (). Clearselections (); Gridpanel.getview (). Refresh ();

Two buttons share an interface and click the interface save button to invoke different events

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.