Cocoon Forms has now a "native" support for "complex" properties and JXPath factories.
Simply implement your JXPath factory, as shown in my previous post, and configure it in you binding, without adding any other class.
Take a look at this XML snippet showing a binding example:
<fb:value id="name" path="name"/>
<fb:value id="surname" path="surname"/>
<fb:context path="residence" factory="com.example.AddressFactory">
<fb:value id="street" path="street"/>
As you can see, you must configure your factory class inside a "factory" attribute of an enclosing context element;
enclosed binding elements will automatically use this factory.
For using this new feature, you have to checkout the Cocoon revision 227024 or later, from:
It is in development, but is almost stable.
Have a nice Cocoon coding!