cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robin Wyles <>
Subject RepeaterJXPathBinding
Date Tue, 06 Dec 2005 11:02:52 GMT
Hi All,

Up until recently I was able to have a repeater binding like this...

<fb:repeater id="repeater" parent-path="." row-path="collection">
		<fb:value path="id" id="id" />
		<fb:delete-node />

This would handle the loading, updating and deleting of rows in the  
repeater, but ignore newly added rows. This was neat because it meant I  
could use a second custom binding to handle the binding for newly added  
rows thus allowing me to bind collections containing objects of  
different classes.

However after revision 349806 of this usage  
results in...

org.apache.commons.jxpath.JXPathException: Cannot create a relative  
context for a non-existent node: /collection[8]

Comparing this revision with the previous one I can see why the error  
is occurring - in the previous revision the new row context is not  
created if the insert binding does not exist, this is not the case in  
the latest revision. I've patched my copy which continues to work as  
expected for normal repeater bindings and my binding as outlined above.  
However I don't know enough about the binding framework to know if this  
change between the last revision was for a specific reason and whether  
my patch to revert the behaviour will break other things. Can someone  
take a look?



View raw message