You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Michael Ralston <mi...@ralston.id.au> on 2006/07/18 15:59:38 UTC
exploration into cforms usecase
The lenya site
(http://lenya.apache.org/1_4/reference/usecase-framework/index.html)
only describes the JX templating usecase approach. There seems to be
alot of work gone into integrating CForms into the usecase framework but
it is only used by the cforms module, and even then there is no
documentation.. I've tried to describe what I've figured out....If
anyone wants to enlighten me on something I've missed or got completely
wrong, I'll stick something on the wiki.
I started out looking in
modules/cforms/config/cocoon-xconf/usecase-edit.xcon I figure each of
view's child elements (intro, definition, binding and outro) contain
flowscript to execute to get the form to work. I've figured out this
configuration is processed by UsecaseView.configuration(Configuration).
If the viewType is equal to cforms it read in those elements.
Control goes back to webapp/lenya/usecases/usecases.js, line 139 after a
large comment there is a generic variable set up, holding the usecase
proxy (which allows you to get parameters from the usecase). Then the
usecase properties are read back out of UsecaseView. The intro section
is executed without the magic generic variable being passed to it. The
form definition is loaded, the binding is loaded and the form is displayed.
Line 227 calls the javascript function, passRequestParameters which is
at the top of the file. This sets all the parameters on the usecase.
Does this pass cforms parameters back to the usecase too?
If the cform exits via submit, cancel or 'ok' (according to line 230)
then the usecase is completed.
It bothers me that this cform usecase is reading/writing directly
to/from a xml document too. If really limits the cforms usecase to being
a structured content editor. What if you wanted to talk to some of
lenya's apis from cforms? I guess you'd just have to use JX....
Thanks for your attention :)
Michael R
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lenya.apache.org
For additional commands, e-mail: dev-help@lenya.apache.org