cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Burridge <maill...@burridge.net>
Subject Re: [Woody] How to get value in flowscript, modify it, and put it back before xml bind
Date Mon, 19 Jan 2004 20:02:16 GMT
Appreciate the link, but I've been through that wiki many times and
haven't been able to solve my problem.

In summary, I need to be able to get a submitted value from the form and
increment it by one, before the xml of the data is created.

Brian

On Mon, 2004-01-19 at 14:57, Jim Horner wrote:
> > I need to, in the flowscript, increment these values before they are
> > written back into the xml. However, I am unable to retrieve the value by
> > doing cocoon.request.get("contacts.0.votes"), and even if I did I don't
> > know how to change the parameter.
> 
> I've found this docu to be priceless:
> 
> http://wiki.cocoondev.org/Wiki.jsp?page=Woody
> 
> This might help you; as I am not sure I follow your setup exactly and you 
> might have to play around with conversions, dunno...
> 
> <wd:field id="contacts.0.votes">
> 	<wd:label>Daffy Duck</wd:label>
> 	<wd:datatype base="long" />
> </wd:field>
> 
> <wd:submit id="vote" action-command="vote">
>   <wd:label>Vote</wd:label>
>   <wd:on-action>
> 
>    var contact0Widget = event.source.parent.getWidget("contacts.0.vote");
>    var contact0Votes = contact0Widget.value;
>    // or maybe contact0Widget.value = contact0Widget.value + 1;
>    // do something with votes... etc...
> 	
>   </wd:on-action>
> </wd:submit>
> 
> 
> ---------------------------------------------------------------------
> 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