Created
October 17, 2012 21:33
-
-
Save forcementor/3908382 to your computer and use it in GitHub Desktop.
Developing Mobile…Force.com and Sencha-Part 2, Step 8: Adjusting the Model and Adding a Data Proxy - Validation Stub 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onSaveLeadCommand: function () { | |
| console.log("onSaveLeadCommand");... | |
| //Check for validation errors. | |
| var errors = currentLead.validate(); | |
| if (!errors.isValid()) { | |
| var msg = ''; | |
| errors.each(function (error) { | |
| msg += error.getMessage() + '<br/>'; | |
| }); | |
| console.log('Errors: ' + msg); | |
| Ext.Msg.alert('Please correct errors!', msg, Ext.emptyFn); | |
| currentLead.reject(); | |
| return; | |
| }... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment