You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Binkley, Peter" <Pe...@ualberta.ca> on 2004/06/10 03:14:52 UTC
on-insert-row and default values
I'm trying to set default values in the fields of a new row in Cocoon forms
(with an XML back end, not a bean). In my binding I've tried things like
this:
<fb:on-insert-row>
<fb:insert-node>
<transaction>
<timestamp>2004-06-09</timestamp>
</transaction>
</fb:insert-node>
</fb:on-insert-row>
But the value doesn't get through to the form. I can't find an example that
illustrates this problem. What do I need to do to get a default value into a
field in a new row? I suppose it's a binding problem, but I'm not sure what
I'm binding to in this case.
I'd like to get to something dynamic like this:
<fb:on-insert-row>
<fb:insert-node>
<transaction>
<timestamp>
<fb:javascript>
var now = new Date();
widget.setValue(now);
</fb:javascript>
</timestamp>
</transaction>
</fb:insert-node>
</fb:on-insert-row>
Any suggestions welcome!
Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org