cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Juffer <>
Subject binding framework and collections
Date Sun, 08 Oct 2006 15:46:06 GMT
Hi all,

I have a problem with updating a POJO java class that contains a set 
using the binding framework as documented at:

I have a Parent class with Children (a very simplified example):

binding file:

<fb:context xmlns:fb="" path="/" >
   <fb:value id="children" path="children" />

Java class (POJO):

class Parent {
   private Set<String> children;
   public void setChildren(Set<String> names);
   public Set<String> getChildren();

I have one form that is processed with flow. This all works very fine 
except that I cannot load the data from the form into the Parent class 
"" (bean is of type 'Packages.Parent'). I get the 
following error:

java.lang.RuntimeException: Cannot set value of field "names" with an 
object of type java.util.HashSet

I actually tried also with ArrayList. It is easy to solve this problem 
with a Javascript class named Parent instead of a Java POJO class named 

My question is now what is the Java collection type that Cocoon can 
handle? Is this in fact even possible? I looked through the 
documentation and also the mailing list, but could not find an example 
or an explanation on this (must have overlooked).

Thanks for your help,

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message