You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jan Hoskens <jh...@schaubroeck.be> on 2003/12/08 16:37:48 UTC
Woody repeater binding
Hi,
I'm trying to bind an XML document to my woody form. The repeater requires a
unique-row-id and unique-path for every row. My rows do not have one unique
attribute but they do have a unique combination of attributes. e.g:
<TVSeries id="buffy" episode="10"/>
The two attributes together do define a unique row, but each attribute apart
is not unique. Is there any way to use these attributes together as my
'row-identifier' or do I have to create an extra unique attribute?
Greetings
Jan
Re: Woody repeater binding
Posted by Marc Portier <mp...@outerthought.org>.
Jan,
(and copying dev since we're having some repeater-binding related
discussions there lately)
congrats with another very sensible use case, you seem to be building a
catalog of those :-) pls keep 'em comming
as for the issue at hand, I'm a bit afraid it's a no go here and now.
1/ purely declaratively in the binding-def file this would require a
more self-contained description of the binding used for the unique-key stuff
(if you check the code of the repeater-binding you would see that it
uses a simple value-binding to do the binding of the unique-id to/from
the unique-path)
if we could allow for letting this unique-id-binding be user defined
through some nested
<wb:repeater>
<unique-id>....here goes your binding declaration...
then we are already half way there...
(for your case you could then use a nested aggregate binding or even the
new struct-container from Timothy)
2/ finally implementation-wise this would call for a change in the
interface of the binding... next to load() and save() methods we would
need some hasMatchingValue() check method that can be used for the
matching of the values
(currenlty the repeater impl also remembers the unique-id and -path and
abuses that do the matching on a more direct level. By introducing the
new check-method we can keep on hiding those details into the
specialized binding itself)
hope this makes sense?
unfortunately I can't work on this before friday, I do hope it's not
blocking your activity
regards,
-marc=
Jan Hoskens wrote:
> Hi,
>
> I'm trying to bind an XML document to my woody form. The repeater
> requires a unique-row-id and unique-path for every row. My rows do not
> have one unique attribute but they do have a unique combination of
> attributes. e.g:
>
> <TVSeries id="buffy" episode="10"/>
>
> The two attributes together do define a unique row, but each attribute
> apart is not unique. Is there any way to use these attributes together
> as my 'row-identifier' or do I have to create an extra unique attribute?
>
> Greetings
>
> Jan
--
Marc Portier http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/mpo/
mpo@outerthought.org mpo@apache.org
Re: Woody repeater binding
Posted by Marc Portier <mp...@outerthought.org>.
Jan,
(and copying dev since we're having some repeater-binding related
discussions there lately)
congrats with another very sensible use case, you seem to be building a
catalog of those :-) pls keep 'em comming
as for the issue at hand, I'm a bit afraid it's a no go here and now.
1/ purely declaratively in the binding-def file this would require a
more self-contained description of the binding used for the unique-key stuff
(if you check the code of the repeater-binding you would see that it
uses a simple value-binding to do the binding of the unique-id to/from
the unique-path)
if we could allow for letting this unique-id-binding be user defined
through some nested
<wb:repeater>
<unique-id>....here goes your binding declaration...
then we are already half way there...
(for your case you could then use a nested aggregate binding or even the
new struct-container from Timothy)
2/ finally implementation-wise this would call for a change in the
interface of the binding... next to load() and save() methods we would
need some hasMatchingValue() check method that can be used for the
matching of the values
(currenlty the repeater impl also remembers the unique-id and -path and
abuses that do the matching on a more direct level. By introducing the
new check-method we can keep on hiding those details into the
specialized binding itself)
hope this makes sense?
unfortunately I can't work on this before friday, I do hope it's not
blocking your activity
regards,
-marc=
Jan Hoskens wrote:
> Hi,
>
> I'm trying to bind an XML document to my woody form. The repeater
> requires a unique-row-id and unique-path for every row. My rows do not
> have one unique attribute but they do have a unique combination of
> attributes. e.g:
>
> <TVSeries id="buffy" episode="10"/>
>
> The two attributes together do define a unique row, but each attribute
> apart is not unique. Is there any way to use these attributes together
> as my 'row-identifier' or do I have to create an extra unique attribute?
>
> Greetings
>
> Jan
--
Marc Portier http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
Read my weblog at http://blogs.cocoondev.org/mpo/
mpo@outerthought.org mpo@apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org