cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roberto Marra" <>
Subject Re: CForms & value of field...
Date Wed, 18 May 2005 14:14:51 GMT
Hi Jeroen & thanx.
I had a look of the OJB samples. Let say that now my main target is not to write to db but
to have the value of the CForm available in the flowscript & I want to do that via binding.
So in the sitemap I got that now:

<map:match pattern="regContatti">
<map:call function="handleForm">
<map:parameter name="function" value="storeContact"/>
<map:parameter name="form-definition" value="forms/definitions/contatti.xml"/>
<map:parameter name="bindingURI" value="binding/contatti/bindContatti.xml"/>

& in the flowscript
   var bindingFile =  cocoon.parameters["bindingURI"];
   var bean = new;




  but "test" return me null. So for sure I didn't understand something...or more...


  ----- Original Message ----- 
  From: Jeroen Reijn 
  Sent: Wednesday, May 18, 2005 9:52 AM
  Subject: RE: CForms & value of field...

  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