cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Max Pfingsthorn (JIRA)" <>
Subject [jira] Commented: (COCOON-1794) [PATCH] Propagation of namespaces to a repeaters child bindings and implementation of a move-node binding
Date Tue, 07 Mar 2006 16:36:41 GMT
    [ ] 

Max Pfingsthorn commented on COCOON-1794:

This is an interesting topic. However, retrospectively moving the rows around doesn't seem
to be the best way to solve this. Instead, the InsertNodeJXPathBinding should know to insert
a node after another (or before). I'm having a look into it right now as we have the same
Additionally, we should try to stay backward compatible with the repeater definition and we
shouldn't break being able to bind to beans. Keeping it consistent between XML and JavaBeans
bindings might be a problem as beans don't support moving children around after they are added.
And requiring a "move" binding which doesn't exist for beans of course makes the repeater
unusable for that case.

I would put some XML specific code in to the RepeaterJXPathBinding if the insertBinding is
a InsertNodeJXPathBinding. That way, we can ensure the relative AND absolute positioning of
the XML elements created by the binding.

By absolute I mean this: We often use the repeater without an enclosing context for each row.
New rows will always end up in the end of the document (or enclosing element), not after the
bulk of other rows, which can be a big problem if you need to validate the resulting xml.

So, I'll be working on some specific hacks to make this work for XML and not break it for
beans without influencing the configs.

> [PATCH] Propagation of namespaces to a repeaters child bindings and implementation of
a move-node binding
> ---------------------------------------------------------------------------------------------------------
>          Key: COCOON-1794
>          URL:
>      Project: Cocoon
>         Type: Bug
>   Components: Blocks: Forms
>     Versions: 2.1.8, 2.1.9-dev (current SVN)
>     Reporter: Suzan Foster
>  Attachments: repeater-binding-patch.txt
> This patch corrects the following issues:
> - Namespaced back-end XML model not correctly binding to the repeaters child widgets.
> - Nodes bound to row widgets not being reordered according to row position on save.
> Files affected:
> - JXPathBindingBase:
>   - member applyLeniency changed from private to protected.
>   - member applyNSDeclarations changed from private to protected.
> - RepeaterJXPathBinding:
>   - constructor changed for passing a binding for moveRow.
>   - applyLeniency and applyNSDeclarations applied to created relative contexts.
>   - member moveRowBinding added.
>   - method getMoveRowBinding added.
>   - doSave changed to incorporate the use of moveRowBinding.
> - RepeaterJXPathBindingBuilder:
>   - buildBinding changed to incorporate the construction of moveRowBinding.
> Files added:
> - MoveNodeJXPathBinding.
> - MoveNodeJXPathBindingBuilder.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message