cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Horner <jhor...@arinbe.com>
Subject Re: [Woody] How to get value in flowscript, modify it, and put it back before xml bind
Date Mon, 19 Jan 2004 19:57:40 GMT
> 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


Mime
View raw message