Hi there,
I am trying to edit a file with a form inside the portal. I have the
form-definition -template and -binding all set up. I used the JavaScript
Debugger to sort out where the problem occurs, and it seems that the
binding doesn't work properly. I get an exception in Form.js in line 236
and the error message I get says:
org.apache.cocoon.forms.binding.BindingException: Cannot build binding
at file:/D:/my/path/to/cocoon/abbrev/scrum_bind_xml.xml:25:56
The line in the binding document is this one:
<fb:javascript id="id" path="@id" direction="save">
and pos. 56 is right in the word "direction".
does direction "save" in this on-bind element work together with the
attribute "save" in the identity-element? or do they collide? (see below)
I got this from the form-binding sample and adapted it to my
data-document (i.e. changing the element name from contact to member), I
thought it was necessary, but maybe I don't need it?
<fb:identity>
<fb:value id="id" path="@id" direction="load">
<fd:convertor datatype="long" />
</fb:value>
</fb:identity>
<fb:on-bind><!-- executed on updates AND right after the insert -->
<fb:javascript id="id" path="@id" direction="save">
<fb:save-form>
var appValue = jxpathPointer.getValue();
if (appValue == '') {
var precSiblId =
jxpathContext.getValue("../preceding-sibling::member/@id");
var newId = Number(precSiblId) + 2
jxpathPointer.setValue(newId.toFixed(0));
}
</fb:save-form>
</fb:javascript>
<fb:value id="team_member-name" path="name"/>
<fb:value id="team_member-contact" path="contact"/>
</fb:on-bind>
I hope someone can help me out here, I am kind of confused as to what
all this does.
thank you all in advance,
christian
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]