cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeroen Reijn" <>
Subject RE: CForms & value of field...
Date Wed, 18 May 2005 07:52:08 GMT
Hi Roberto,
I think binding the form could be a great solution for your problem. You could check out the
OJB samples to see how to write to the DB.

-----Original Message-----
From: Roberto Marra []
Posted At: Wednesday, May 18, 2005 9:23 AM
Posted To: Cocoon User List
Conversation: CForms & value of field...
Subject: CForms & value of field...

Hi all,
I guess I missed something about the process of get value from the CForm to the flowscript.
So hope somebody can clarify me it.
I got a CForm definition file & a template. Then in my pipeline I got a match pattern
that call a function & pass the parameter of the CForm in this way:
     <map:parameter name="ragSoc" value="{request-param:ragSoc}"/>
     <map:parameter name="indirizzo" value="{request-param:indirizzo}"/>
     <map:parameter name="cap" value="{request-param:cap}"/>
     <map:parameter name="citta" value="{request-param:citta}"/>
     <map:parameter name="nazione" value="{request-param:nazione}"/>
     <map:parameter name="telefono" value="{request-param:telefono}"/>

then, in my flowscript I do that:
    ragSoc    = cocoon.parameters["ragSoc"];
    indirizzo = cocoon.parameters["indirizzo"];
    cap       = cocoon.parameters["cap"];
    citta     = cocoon.parameters["citta"];
    nazione   = cocoon.parameters["nazione"];
    telefono  = cocoon.parameters["telefono"];
    email     = cocoon.parameters["email"];
    lingua    = cocoon.parameters["lingua"];
    pwd       = cocoon.parameters["pwd"];
    confpwd   = cocoon.parameters["confpwd"];

& then I call a Java method & I do what I have to do (in this case write the value
in the db). So, that could be interesting for one CForm, but Im making an application programm,
with a lot of CForms with a lot of field. Im sure I have not to send everytime all the field
in this way to flowscript, Im sure there is an elegant way to do that. Is the binding file
the solution? I saw different example of binding but in the example the binding is used most
of the time to write data in the CForms..
Any suggestion?
Thanx in advance

View raw message