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 Re: Accessing form data from a JX template
Date Fri, 17 Mar 2006 18:27:54 GMT

> 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,

It surely did! Thanks! What I see now I can esaily do is to pass the 
form itself inside the "viewdata":

        var vd = { "formulario" : formulario };
        formulario.showForm("alta-de-cliente-adolescente-pipeline", vd);

and then do:

        <jx:out value="${formulario.getChild('name').value}"/>


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


Mime
View raw message