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