>>>>> "Joerg" == Joerg Heinicke <[EMAIL PROTECTED]> writes:
Joerg> IIRC you can add a <fb:on-bind> on the same level as
Joerg> <fb:on-insert> where you add the logic for id generation
Joerg> via <fb:javascript>.
I'm trying to do this, but I'm running into real problems.
The Mozilla javascript console shows nothing.
The following:
<fb:javascript id="id" path="count(preceding::sibling[local-name() = 'event']) +
1" direction="load">
<fb:load-form>
var appValue = java.lang.StrictMath.floor (jxpathPointer.getValue());
var formValue = new java.lang.Double (appValue);
var longValue = new java.lang.Long (formValue.longValue());
widget.setValue (longValue);
</fb:load-form>
</fb:javascript>
Yields:
"file:/home/colin/onevoice/members/forms/event-binding.xml", line 40:
uncaught JavaScript exception: at events2xml
(file:/home/colin/onevoice/members/flow/binding.js, Line 12) at
(resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line
165): java.lang.ClassCastException
org.apache.avalon.framework.CascadingRuntimeException:
"file:/home/colin/onevoice/members/forms/event-binding.xml", line 40:
uncaught JavaScript exception: at events2xml
(file:/home/colin/onevoice/members/flow/binding.js, Line 12) at
(resource://org/apache/cocoon/forms/flow/javascript/Form.js, Line
165): java.lang.ClassCastException
Why I don't know - nor how to debug it, but the XPath expression is
correct, I think (for the first binding attempt, it yields the string
"1.0").
On the documentation page, the example shows use of a function
doLoadConversion(),
But if I try to use this, I get an error saying there is no such function.
--
Colin Paul Adams
Preston Lancashire
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]