Edentity Web Systems
You solve creative. We crack code.
/Header/WhoWeAre.jpg
 

12/21/2009 Agility Tip: Handling Agility Save Events in Client Mode
Posted by Joel Varty

One of the features we added this year was the ability to write Input Forms for Content Definitions and Module Definitions that are for "client side save", which means that the values of the content item are saved using Javascript instead of a postback.

In order to handle before and after save events for these, you need to do the following:

    ContentItem_BeforeClientSave = function () {
        alert("before save!");
        return true;
    }
   
    ContentItem_AfterClientSave = function (contentItemID) {
        alert("after save - " + contentItemID);       
    }

The "before save" is a cancel-able event - meaning you can return false to stop the save from happening.  This is great if you need to do some extra validation.  The regular field validation will run after this.

The "after save" is a chance for you to run a script after the save has successfully completed and all of the attachments and linked content areas have been updated.  This event will run even on a save-and-close - so you should test it in all the save situations (save, save and close, save and preview).

These events are especially useful if you have linked content on the item that you want to show only after the item has been saved for the first time.

more later - joel.

 

 

« Back to Blog Main Page |

0 Comment(s)

Leave Comment

Name:
Comment:  
 
Edentity Web Systems Inc.
Suite 201
40 Spadina Ave.
Toronto ON
M5V 2H8
Tel:
416.591.2500
Fax:
416.352.5270

From Our Blog

02/09/2010
Amazon S3 – Now with Versioning! Posted by Joel Varty
02/02/2010
01/19/2010
411 Length Required in Firefox 3 Posted by Andre Small
Home | Who We Are | What We Do | Clients & Brands | Careers | Contact

Copyright © 2010 Edentity Web Systems Inc. Privacy Policy