cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nacho Jimenez <nacho.jime...@gmail.com>
Subject Re: mix AJAX with cocoon
Date Wed, 24 Aug 2005 08:38:37 GMT
Aside of the 'Gmailization' of the CForms templates that's going on, I
have developed a small set of javascript functions to move part of the
controller to the browser (control of menus, error messaging from the
server, etc..). I know some of you will think of that move as anathema
(banish him! He's mixing the view with the controller back again) but
for a complete AJAX feeling, you need to have a small controller on
the browser.

My set up is like this: I have an XML file (AppDefiniton.xml) with a
list of the actions, and what to do when an action is triggered (get
url "X" in container "Y", post form "F" and show result in container
"C", etc.). That file is transformed into an HTML/JS page that acts as
the controller/main window of the application, and makes calls to
XMLHTTPRequest as you go pushing buttons, submitting forms, etc. Then,
the sitemap/flow (mainly flow) handles the calls for the
content/actions that are gonna be called (show main menu, show
customer 'X', insert new customer, etc). It's really easy and it
rocks.

It's integrated with the Cocoon-Hibernate-Spring Mix, so I'm calling
it CHAS until i got some of my imagination back.

I was planning on cleaning up the code and publish a wiki page with a
walkthrough and the code (dead easy 500 lines of javascript), but I've
had some serious familiy issues that took my time away this august.
Maybe next month, once 2.1.8 is out and CForms has also AJAX support.

Salu2...

Nacho.

PD: Hoy estoy espeso y no se si se me entenderá en ingles. Si
necesitas la traducción al español, mandame un email privado.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message