On 30 Sep 2005, at 12:42, Jeremy Quinn wrote:


I would be interested in re-writing TimedBrowserUpdater to use the Prototype Libraries if that seemed appropriate.

What I am interested in finding out from you at the moment is how you plan to use the Prototype libraries with CForms.

Will the basic mechanism used by Ajax CForms on the Server stay the same ?

i.e.
Ajax requests come back to the same URL (as the initial page) with a 'cocoon-ajax' param JXMacros wrap <bu:update id="n"><p>bonjour</p></bu:update> according to the state of 'cocoon-ajax' The BrowserUpdateTransformer filters according to the state of 'cocoon-ajax'
    The Serializer is switched according to the state of 'cocoon-ajax'

Then re-write the existing BrowserUpdate client side JS to use the Prototype libraries. In effect providing a generic function that can update a page from a <bu:document> that can be given to an Ajax.Request Object as the 'onCompleted' handler option.



This is all done.

Cforms.js is rewritten to use the prototype.js Ajax.Request Object as it's Ajax Engine. This will hopefully reduce our maintennance workload in the future, as prototype.js is a popular and robust library.

All of the cforms samples (that normally work) appear to be still working. :)

Exactly the same transport is used.
i.e.

when the form is first loaded, there is no 'cocoon-ajax' request param, so the whole page is sent a form with Ajax turned on submits certain events via an XMLHTTPRequest to the continuation with the form contents and 'cocoon-ajax' request param set to true. fields that have changed send back a new rendering of themselves in a bu:document/bu:replace BrowserUpdateTransformer filters the rest of the page out from around the updates Cocoon.Ajax.BrowserUpdater replaces tags in the page from matching IDs in the bu:document/bu:replace

I have also added the TimedBrowserUpdater and a sample to the Ajax Block, it also uses the same transport. We use it to selectively refresh in the background, certain screen regions that contain data that frequently changes on the backend, to save the user constantly refreshing the whole page by hand.

enjoy

regards Jeremy




Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to