cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinn Dombrowski <qdomb...@uiuc.edu>
Subject SOLVED: Re: Parameters- from CForms into sitemap
Date Wed, 22 Apr 2009 00:30:45 GMT
That worked perfectly! Thanks so much, Victor!

Víctor Pergolesi wrote:
> Dear Quinn:
> to send more parameters you need to separate them with ",". That 's all.
>
> //
> //  EXAMPLE 1: 2 parameters
> //
> var viewData = { "comprobantes": comprobantes , "fchaenvi": 
> formatoEnvio.format(fchaenvi) };
> //
> cocoon.sendPage("cargacomprobantes-procesado", viewData);
>
>
> //
> // EXAMPLE 2: 9 parameters
> //
> var viewData = { "fchadesde": formatoEnvio.format(fchadesde), 
> "fchahasta": formatoEnvio.format(fchahasta), "codictav" : codictav, 
> "tipoenvi" : tipoenvi, "comprobante" : comprobante, "ip" : ip, "fecha" 
> : fecha, "hora": hora, "tipotarea": tipotarea};
> //
> cocoon.sendPage("consultacomprobantes-procesado", viewData);
>
> I hope this help you.
> *
> Victor Pergolesi*
> *Codimat S.A.*
> Área Sistemas
> *Web:* www.codimat.com.ar <http://www.codimat.com.ar/>
> *Tel.: *(0291) 459-2480 | 459-2424
> *Fax: *(0291) 459-2400 | 0-800-666-42266
> Don Bosco 1495 - B8003CAA Bahía Blanca - Argentina
>
>     ------------------------------------------------------------------------
>     *From:* Quinn Dombrowski [mailto:qdombrow@uiuc.edu]
>     *To:* users@cocoon.apache.org
>     *Sent:* Tue, 21 Apr 2009 12:39:57 -0300
>     *Subject:* Re: Parameters- from CForms into sitemap
>
>     Hi Andre,
>
>     Thanks so much for the code-- it started working!
>
>     registration.js has:
>     var viewData = { "username" : form.getChild("name").getValue() }
>     cocoon.sendPage("registration-success-pipeline", viewData);
>
>     sitemap has:
>     <map:match pattern="registration-success-pipeline">
>     <map:generate type="file" src="myxml.xml"/>
>     <map:transform src="myxsl.xsl">
>     <map:parameter name="username" value="{flow-attribute:username}"/>
>     </map:transform>
>     <map:serialize type="html"></map:serialize>
>     </map:match>
>
>
>     One last question, if you have a chance: is there a way to pass 2+
>     parameters? Right after the code I put above in the
>     registration.js, I have:
>     var viewData2 = { "age" : form.getChild("age").getValue() }
>     cocoon.sendPage("registration-success-pipeline", viewData2);
>
>     and in the pipeline, under
>     <map:parameter name="username" value="{flow-attribute:username}"/>
>     I've got:
>     <map:parameter name="age" value="{flow-attribute:age}"/>
>
>     It seems like a similar problem as before, since something blank is
>     replacing the 'default' value in the xsl:
>     <xsl:param name="age" select="'default'"/>
>
>     I'd guess it's possible to keep adding variables (2, 3, 4, more)
>     to pass
>     to the sitemap, but it doesn't seem to be so easy.
>
>     Thanks a lot, again!
>
>     ~Quinn
>
>
>
>
>
>     André Davignon wrote:
>     > Does
>     >
>     > var username = form.getChild("name").getValue();
>     >
>     > help you ? I hope so.
>     >
>     > André
>     >
>     >
>     >> Thanks for the help, Andre!
>     >>
>     >> *Something* is going through, because I'm getting a blank
>     instead of
>     >> the default parameter I set in the XSL, but I'm still not able to
>     >> pick up the value. I've tried both flow-attr and flow-attribute.
>     >>
>     >> The relevant pieces I've got here are:
>     >>
>     >> Flowscript - registration.js contains:
>     >> var viewData = { "username" : form.getChild("name").getValue() }
>     >> cocoon.sendPage("registration-success-pipeline", viewData);
>     >>
>     >> Sitemap contains:
>     >> <map:match pattern="registration-success-pipeline">
>     >> <map:generate src="myxml.xml" type="file"/>
>     >> <map:transform src="myxsl.xsl" type="xslt2">
>     >> <map:parameter name="username"
>     >> value="{flow-attribute:username}"/>
>     >> </map:transform>
>     >> <map:serialize type="html"/>
>     >> </map:match>
>     >>
>     >> XSL contains:
>     >> <xsl:param name="username" select="'default'"/>
>     >>
>     >> Is there something I'm missing or have wrong?
>     >>
>     >> Thanks again!
>     >>
>     >> ~Quinn
>     >>
>     >>
>     >> André Davignon wrote:
>     >>> Hi,
>     >>>
>     >>> The "flow-attr" input module could maybe help you :
>     >>>
>     >>> <map:parameter name="username" value="{flow-attr:username}"/>
>     >>>
>     >>> or something like that...
>     >>>
>     >>> André
>     >>>
>     >>>
>     >>>> Hello,
>     >>>>
>     >>>> This is my first time working with the Forms block in Cocoon 2.2
>     >>>> and I've gotten a bit stuck. I got the Simple Example to work
>     >>>> (http://cocoon.apache.org/2.2/blocks/forms/1.0/478_1_1.html) but
>     >>>> I'm trying to modify it to pass the {username} value as a
>     parameter
>     >>>> for a different stylesheet.
>     >>>>
>     >>>> I've redirected the registration-success pipeline as:
>     >>>>
>     >>>> <map:match pattern="registration-success-pipeline">
>     >>>> <map:generate src="myxml.xml" type="file"/>
>     >>>> <map:transform src="mystylesheet.xsl" type="xslt2"/>
>     >>>> <map:serialize type="html"/>
>     >>>> </map:match>
>     >>>>
>     >>>> But there's nothing I can do to get the {username} value to show
>     >>>> up. Even when I try something like:
>     >>>> <map:transform src="mystylesheet.xsl" type="xslt2">
>     >>>> <map:parameter name="username" value="{username}"/>
>     >>>> </map:transform>
>     >>>> the value doesn't go through. Any suggestions?
>     >>>>
>     >>>> Thanks!
>     >>>>
>     >>>> ~Quinn
>     >>>>
>     >>>>
>     ---------------------------------------------------------------------
>     >>>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <mailto:users-unsubscribe@cocoon.apache.org>
>     >>>> For additional commands, e-mail: users-help@cocoon.apache.org
>     <mailto:users-help@cocoon.apache.org>
>     >>>>
>     >>>>
>     >>>
>     >>>
>     >>>
>     ---------------------------------------------------------------------
>     >>> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <mailto:users-unsubscribe@cocoon.apache.org>
>     >>> For additional commands, e-mail: users-help@cocoon.apache.org
>     <mailto:users-help@cocoon.apache.org>
>     >>>
>     >>
>     >>
>     >>
>     ---------------------------------------------------------------------
>     >> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <mailto:users-unsubscribe@cocoon.apache.org>
>     >> For additional commands, e-mail: users-help@cocoon.apache.org
>     <mailto:users-help@cocoon.apache.org>
>     >>
>     >>
>     >
>     >
>     >
>     ---------------------------------------------------------------------
>     > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <mailto:users-unsubscribe@cocoon.apache.org>
>     > For additional commands, e-mail: users-help@cocoon.apache.org
>     <mailto:users-help@cocoon.apache.org>
>     >
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
>     <mailto:users-unsubscribe@cocoon.apache.org>
>     For additional commands, e-mail: users-help@cocoon.apache.org
>     <mailto:users-help@cocoon.apache.org>
>
>
>
> ------------------------------------------------------------------------
> Este mensaje y sus adjuntos contienen información confidencial y son para uso exclusivo
del destinatario. Si hubiese recibido este mensaje por error, o contuviera información que
Ud. no desea recibir, por favor le agradecemos nos lo haga saber y lo elimine de su sistema.
Cualquier inconveniente, enviarlo a librodequejas@codimat.com.ar.
> Este correo ha sido chequeado por el servidor de Codimat S.A. www.codimat.com.ar


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


Mime
View raw message