cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ugo Cei <>
Subject Re: [CForms] Creating an intermediate object in binding
Date Mon, 01 Aug 2005 09:01:32 GMT
Il giorno 31/lug/05, alle 14:01, Leszek Gawron ha scritto:

>> I have defined a custom type and convertor for that. The convertor is 
>> actually managed by Spring and populated with a DAO and the 
>> convertor's factory returns the Spring-managed instance instead of 
>> creating a new one.
> The convertor itself is spring manager or just the dao it holds?

> Do I get it right that you need to implement a separate:
> - dao
> - convertor
> - convertor builder
> for every domain object in your model?

Not really. I do it only for those types that are reused across many 
forms and therefore warrant defining a datatype and convertor. At the 
moment, we have developed datatypes for a bunch of "geographical" 
objects like Town, Province, Country, that are used in all the forms 
where you have to input an address. And we have a single "GeoDAO" class 
for all entities of this kind.

In general, I would do this for every "datatype" that is implemented as 
a look-up-table (key => value) in the database and is reused in more 
than a couple of forms, or across more than one different project.


Ugo Cei
Tech Blog:
Open Source Zone:
Wine & Food Blog:

View raw message