You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Victoria Vitaver <vi...@tt.com.au> on 2005/06/08 11:27:18 UTC

cforms, binding examples

Hi,

I am new to Cocoon and am using it 'through' Lenya.
I have been trying to create a form (using cforms) which captures some
input from the user, the input is then recorded as a XML document (later
I will be trying to create/or read/update the XML document .. but first
things first).

I have been following the samples which come with cocoon/various online
wikis & tutorials but have the following questions which I cant
find/don't understand answers to on any of them.

1. Inside the
cocoon-2.1.7/src/blocks/forms/samples/flow/binding_example.js function
form2simpleXML, form.loadXML(documentURI) is called. From what I
understood _form_ was an instance of
org.apache.cocoon.forms.flow.java.FormInstance, but loadXML()/saveXML()
are not declared methods for this object
(http://cocoon.apache.org/2.1/apidocs/index.html). What am I missing?

Also inside the same file, function loadDocument(uri) a component
Packages.org.apache.excalibur.xml.dom.DOMParser is used, I cant seem to
find an API for this class.

2. I am having a little trouble understanding the <fb:identity> element.
So I _have_ to include one inside my repeater widget if I want to be
able to bind it at a later stage? Is there any way around it(ie I rather
not) ?

3. Inside the template which generates the html :
what is the difference between using <ft:widget> and
<ft:repeater-widget> for a widget which is defined as a repeater?

(the ft:widget way seems to work for me, whilst ft:repeater-widget
doesn't, shouldn't it be vice-versa?)

4. To use a binding all you do is tell your form about it by doing
form.createBinding(bindingURI) right? Do you need to add anything extra
in the sitemap.xmap?

Sorry if these qs seem basic, its just cforms, binding & trying them to
work has been causing me a good few grey hairs this week ... (and Im
only 22 :( )


Thanks in advance,

Vica


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org