cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicolás Lichtmaier <n...@reloco.com.ar>
Subject Accessing form data from a JX template
Date Fri, 17 Mar 2006 18:08:00 GMT
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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message