Hi Nicolás,
you should pass everything you need inside the JX as a bizdata, since
you are already placing the name as a biz data you can use it from JX
with the bizdata name you used in flow, for example :
// Placing the value of the field "name" as bizdata "username"
var viewData = { "username" : formulario.getChild("name").getValue() }
// Using bizdata in your sendpage
cocoon.sendPage("alta-de-cliente-exito", viewData); }
<!-- Using the bizdata "username" placed in flow -->
<jx:if test="${username == 'Nico'}">
<p>Sos Nico!</p>
</jx:if>
Hope this helps,
Simone
Nicolás Lichtmaier wrote:
Quick question from a Cocoon newbie:
How can I access a form object from a jx template (cforms).
I have this flowscript:
function altaDeCliente()
{
var nombre = "altaDeCliente";
var formulario = new Form("cocoon:/" + nombre + "FD.xml");
formulario.showForm("alta-de-cliente-pipeline");
if(formulario.getChild("age").getValue() < 20)
{
formulario.showForm("alta-de-cliente-adolescente-pipeline");
}
var viewData = { "username" : formulario.getChild("name").getValue() }
cocoon.sendPage("alta-de-cliente-exito", viewData); }
I've tried to use
<jx:if test="${formulario.name == 'Nico'}">
<p>Sos Nico!</p>
</jx:if>
...but it doesn't work!
I'd appreciate any help.
Thanks!
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Simone Gianni
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]