My problem was to bind a form on 2 different xml paths (so 2 bindings),
I have resolved it by rewriting binding functions like this : function createAndGetBinding(bindingURI) { var bindingManager = null; var source = null; var resolver = null; try { bindingManager = cocoon.getComponent(Packages.org.apache.cocoon.forms.binding.BindingManager.ROLE); resolver = cocoon.getComponent(Packages.org.apache.cocoon.environment.SourceResolver.ROLE); source = resolver.resolveURI(bindingURI); return bindingManager.createBinding(source); } finally { if (source != null) resolver.release(source); cocoon.releaseComponent(bindingManager); cocoon.releaseComponent(resolver); } } Then I use this function to create 2 bindings, and I use twice the function loadFormFromModel to load data to my form with the 2 bindings. I found this solution on a old post about woody, but that already works on cocoon forms. Barbara Slupik a écrit : Can you please explain it once again? I don't really understand your problem. --
Le présent mail ainsi que toutes les informations qu'il contient ne peuvent en aucun être considérés comme un engagement juridique de quelque nature que ce soit de JOUVE. Tout accord devra être formulé par écrit papier ultérieur signé par un représentant légal de JOUVE. Par ailleurs, si vous recevez ce mail par erreur, merci de nous le signaler et de le détruire ainsi que l'intégralité du document qui pourrait y être joint. |
Title: Héléna Tanguy - Jouve SI
- Binding on different xml paths Héléna Tanguy
- Re: Binding on different xml paths Barbara Slupik
- Re: Binding on different xml paths Héléna Tanguy