cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Crabtree <paul.crabt...@gmail.com>
Subject Re: passing data from flow to jx (lots of typing)
Date Fri, 05 Nov 2004 10:49:07 GMT
If i've understood you right you seem to be using the cforms mechanism
to transfer bizdata into xml to then be transformed?

If so why dont you pass your bizdata bean or whatever else through to
your jx template as a parameter of sendPage()?

example:
var biz = getBackendBizdata();
cocoon.sendPage("my-pipeline-view", {"biz" : biz});

then in your jx template you will be able to call properties/methods
of that object.

 <myfield> ${biz.myField}</myfield>

Is that what you mean or are you using cforms in some other way?

Paul


On Fri, 5 Nov 2004 11:40:15 +0100 (MET), Philipp Rech
<philipp.rech@gmx.de> wrote:
> Hello Cocooners!
> 
> here is what i know and do:
> having a CForm field
> 
>      <fd:field id="myfield" required="true">
> 
> a pass the value via a bizdata object in the flowscript writing:
> 
>      "myfield" : model.myfield
> 
> then I can use that in the JXTemplate (in XML) as:
> 
>      <myfield> #{myfield}</myfield>
> 
> and transfer it via XSLT. I dn't wanna use HMTL in the JXTemplate.
> all works okay so far...
> 
> QUESTION: do i have to do it that way? since i have many fields it is a lot
> of typing and the flowscript gets kinda large... is there a better / faster
> way to pass the data to the JX Template? Like passing all data from model to
> bizdata object using the same name? The names of the fields and the names of
> the XML tags are the same in the end (in my case). If not i will just keep
> on typing... ;) Does the "binding framwork" make that step obsolete?
> 
> Thank you very much and have a great weekend!
> -phil
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
>

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


Mime
View raw message