You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Mark Lundquist <ml...@wrinkledog.com> on 2006/07/18 03:21:16 UTC
[CForms] And another thing! :-)
Going through http://cocoon.apache.org/2.1/userdocs/binding.html again,
I came across this tortuous passage:
---------
NOTE: The attributes unique-row-id and unique-path and the child
element fd:convertor are deprecated in favor of <fb:unique-row>.
The fb:repeater binding binds repeaters based on the concept that each
row in the repeater is identified by one or more widgets uniquely. This
unique identification is necessary to know which rows in the repeater
correspond to which objects in the target collection. Newly added rows
in the repeater can (but should not) have a null value for this
identification widget(s). Typically this/these widget(s) will not
editable, so in most cases it will be an output widget. If you don't
need the identification widget(s) at the client you don't need to add
them to the template at all! You only have to specify direction="load"
to this/these widget(s) then. This prevents the database IDs from
getting to the client.
The id attribute should contain the id of the repeater.
The unique-row-id attribute specifies the id of the widget appearing on
each repeater row that contains the unique identification for that row.
The unique-path attribute contains the corresponding path in the object
model.
NOTE: Both attributes are deprecated. Please use <fb:identity> instead.
----------
Then, after a bunch of unrelated discussion, comes this:
-----------
The childrens of the fb:unique-row specify the widgets appearing on
each repeater row for the unique identification of that row. Each
<fb:unique-field> child specifies one widget.
-----------
Not sure what that means either, but it looks like it belongs up with
the other stuff...?
OK, so @unique-row-id and @unique-path are deprecated. Got that. In
favor of... what? <fb:unique-row>? Or <fb:identity>? Or either,
depending on... something?
I'll be happy to edit this section to make it comprehensible, once I
achieve some understanding of it myself :-)
Sorry for the snarkiness... just feeling a little frustrated is all :-)
thx for any help,
—ml—
Re: [CForms] And another thing! :-)
Posted by Antonio Gallardo <ag...@agssa.net>.
Mark Lundquist escribió:
>
> On Jul 18, 2006, at 5:14 AM, Vadim Gritsenko wrote:
>
>> Mark Lundquist wrote:
>>> OK, so @unique-row-id and @unique-path are deprecated. Got that. In
>>> favor of... what? <fb:unique-row>? Or <fb:identity>? Or either,
>>> depending on... something?
>>> I'll be happy to edit this section to make it comprehensible, once I
>>> achieve some understanding of it myself :-)
>>> Sorry for the snarkiness... just feeling a little frustrated is all :-)
>>
>> LOL
>>
>> When 'unique identification widgets' were first introduced, they were
>> called something else then what they are called now.
>
> Right... I got that much :-)
>
>> Now they are known as <fb:identity>.
>
> OK — and I have always used <fb:identity>, so I must have figured out
> that this was the thing to do... so I guess my only question left is,
> what about <fb:unique-row>?
Hi,
I think <fb:unique-row> was the initial name for <fb:identity>.
<fb:unique-row> is now deprecated. I don't remember out of hand, I
suspect <fb:unique-row> never existed, because it was never released.
> Hmm... looking at the source code, it's nowhere to be found. From the
> documentation, it appears that at one point it was meant to allow the
> implementation of composite identity schemes, but it either was never
> implemented, or was superseded by the time of the release but the doc
> was never changed?
>
> Also, w.r.t. @unique-row-id and @unique/path, they are no longer
> "deprecated" as such — they are now unsupported, and the
> implementation does the courtesy of recognizing them and throwing
> BindingException.
They were deprecated, because they did not allow to define more than one
widget. Or it was to complicated to parse them. Hence it was deprecated
in favor of <fb:identity>. A sample of the new way is here(look for the
repeater):
http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/form2_bind_bean.xml?revision=392580&view=markup
I think <fb:identity is not mandatory, there is still the simple repater:
http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-sample/src/main/resources/COB-INF/forms/dynamicrepeater_binding.xml?revision=392580&view=markup
HTH.
>
> So, I would remove all references to them from the docs, and the same
> for <unique-row> and <unique-field>. WDYT?
Great idea, please do! :-)
Best Regards,
Antonio Gallardo.
Re: [CForms] And another thing! :-)
Posted by Antonio Gallardo <ag...@agssa.net>.
Hi Marc,
Perhaps this links to developer discussions might help in your very
welcomed documentation effort:
http://marc.theaimsgroup.com/?t=107825346700001&r=1&w=2
http://marc.theaimsgroup.com/?t=108059916300004&r=1
http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=111200501305249
HTH,
Best Regards,
Antonio Gallardo.
Mark Lundquist escribió:
>
> On Jul 18, 2006, at 5:14 AM, Vadim Gritsenko wrote:
>
>> Mark Lundquist wrote:
>>> OK, so @unique-row-id and @unique-path are deprecated. Got that. In
>>> favor of... what? <fb:unique-row>? Or <fb:identity>? Or either,
>>> depending on... something?
>>> I'll be happy to edit this section to make it comprehensible, once I
>>> achieve some understanding of it myself :-)
>>> Sorry for the snarkiness... just feeling a little frustrated is all :-)
>>
>> LOL
>>
>> When 'unique identification widgets' were first introduced, they were
>> called something else then what they are called now.
>
> Right... I got that much :-)
>
>> Now they are known as <fb:identity>.
>
> OK — and I have always used <fb:identity>, so I must have figured out
> that this was the thing to do... so I guess my only question left is,
> what about <fb:unique-row>? Hmm... looking at the source code, it's
> nowhere to be found. From the documentation, it appears that at one
> point it was meant to allow the implementation of composite identity
> schemes, but it either was never implemented, or was superseded by the
> time of the release but the doc was never changed?
>
> Also, w.r.t. @unique-row-id and @unique/path, they are no longer
> "deprecated" as such — they are now unsupported, and the
> implementation does the courtesy of recognizing them and throwing
> BindingException.
>
> So, I would remove all references to them from the docs, and the same
> for <unique-row> and <unique-field>. WDYT?
>
> —ml—
>
Re: [CForms] And another thing! :-)
Posted by Mark Lundquist <ml...@wrinkledog.com>.
On Jul 18, 2006, at 5:14 AM, Vadim Gritsenko wrote:
> Mark Lundquist wrote:
>> OK, so @unique-row-id and @unique-path are deprecated. Got that. In
>> favor of... what? <fb:unique-row>? Or <fb:identity>? Or either,
>> depending on... something?
>> I'll be happy to edit this section to make it comprehensible, once I
>> achieve some understanding of it myself :-)
>> Sorry for the snarkiness... just feeling a little frustrated is all
>> :-)
>
> LOL
>
> When 'unique identification widgets' were first introduced, they were
> called something else then what they are called now.
Right... I got that much :-)
> Now they are known as <fb:identity>.
OK — and I have always used <fb:identity>, so I must have figured out
that this was the thing to do... so I guess my only question left is,
what about <fb:unique-row>? Hmm... looking at the source code, it's
nowhere to be found. From the documentation, it appears that at one
point it was meant to allow the implementation of composite identity
schemes, but it either was never implemented, or was superseded by the
time of the release but the doc was never changed?
Also, w.r.t. @unique-row-id and @unique/path, they are no longer
"deprecated" as such — they are now unsupported, and the implementation
does the courtesy of recognizing them and throwing BindingException.
So, I would remove all references to them from the docs, and the same
for <unique-row> and <unique-field>. WDYT?
—ml—
Re: [CForms] And another thing! :-)
Posted by Vadim Gritsenko <va...@reverycodes.com>.
Mark Lundquist wrote:
>
> OK, so @unique-row-id and @unique-path are deprecated. Got that. In
> favor of... what? <fb:unique-row>? Or <fb:identity>? Or either,
> depending on... something?
>
> I'll be happy to edit this section to make it comprehensible, once I
> achieve some understanding of it myself :-)
>
> Sorry for the snarkiness... just feeling a little frustrated is all :-)
LOL
When 'unique identification widgets' were first introduced, they were called
something else then what they are called now. Now they are known as <fb:identity>.
Vadim