You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by jo...@apache.org on 2004/07/08 00:20:37 UTC
cvs commit: cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/binding RepeaterJXPathBindingBuilder.java
joerg 2004/07/07 15:20:37
Modified: src/blocks/forms/java/org/apache/cocoon/forms/binding
RepeaterJXPathBindingBuilder.java
Log:
throw a BindingException with explanation when other bindings than value binding inside fb:identity are used
Revision Changes Path
1.5 +14 -1 cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/binding/RepeaterJXPathBindingBuilder.java
Index: RepeaterJXPathBindingBuilder.java
===================================================================
RCS file: /home/cvs/cocoon-2.1/src/blocks/forms/java/org/apache/cocoon/forms/binding/RepeaterJXPathBindingBuilder.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RepeaterJXPathBindingBuilder.java 1 Apr 2004 12:59:57 -0000 1.4
+++ RepeaterJXPathBindingBuilder.java 7 Jul 2004 22:20:37 -0000 1.5
@@ -108,8 +108,21 @@
BindingManager.NAMESPACE, "identity");
JXPathBindingBase[] identityBinding = null;
if (identityWrapElement != null) {
+ // TODO: we can only handle ValueJXPathBinding at the moment:
+ // http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107906438632484&w=4
identityBinding =
assistant.makeChildBindings(identityWrapElement);
+ if (identityBinding != null) {
+ for (int i = 0; i < identityBinding.length;i++) {
+ if (!(identityBinding[i] instanceof ValueJXPathBinding)) {
+ throw new BindingException("Error building repeater binding defined at " +
+ DomHelper.getLocation(bindingElm) + ": Only value binding (i.e. fb:value) " +
+ "can be used inside fb:identity at the moment. You can read " +
+ "http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=107906438632484&w=4" +
+ " if you want to know more on this.");
+ }
+ }
+ }
}
RepeaterJXPathBinding repeaterBinding =