cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: Repeater insert-node does not bind??
Date Wed, 03 Nov 2004 15:23:40 GMT
On 03.11.2004 15:21, Jorg Heymans wrote:

> Is this valid for [1] as well ?

No, that's different. Read below.

> Can you elaborate a bit what you mean by this additional binding 
> specification?

With binding specification (or probably better binding definition) I 
mean the fb:* stuff in the binding file. With fb:on-insert-row you 
specify the node (for XML) or the method (for binding to a bean) which 
is executed after form.save() for each row that was inserted. Directly 
after the nodes have been added the values are bound to that newly 
created nodes. Therefore you need a fb:value or whatever is appropriate 
in your case.

> [1] http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=109820425417800&w=2

The problem with your use case described in that mail is simply that 
form.save() is not called and so no binding is executed at all. 
Otherwise you have a problem if the form is not submitted at the end: 
You won't get the original model back. If that's not a problem for you 
you can "unroll" the form.showForm() function and add a form.save() into 
the while loop.

Joerg

>>> While working on a cforms reapeater (bind with an XML doc), I thought 
>>> that
>>> when a new row is created, it would bind directly to the node 
>>> specified in
>>> the binding <fb:on-insert-row> but it seems that this is not the case 
>>> and
>>> the row will be either empty, either filled in by js before showing the
>>> form once again
>>>
>>> Is it possible to make the new row bind on the <fb:on-insert-row> 
>>> node on
>>> creation?
>>
>> IIRC fb:on-insert-row is just about the inserting before the binding 
>> itself happens. You need an additional binding specification (fb:value 
>> or whatever).

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


Mime
View raw message