How will you make this compatibile with 2.1.x? The code  base is shared.

Giacomo Pati wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi all

I'm thinking about springifying CForms and want to check about oppinions.

CFroms is utilizing lots of Avalon ServiceSelector and this hinders extensibility of it as adding new Widget types etc. is becomming a pain with config files in jars.

I've thought about a Spring version of a ServiceSelector to allow a more flexible configuration and extensibility with a class like

class SpringServiceSelector implements BeanFactoryAware, ServiceSelector

Which uses the BeanFactory to fullfill the contracts of the ServiceSelector and thus flattens the configuration from having components inside a ServiceSelector config as whith Avalon to all beans at the same level and thus extensibility is for free than.

I was thinking of going from Avalon config

  <forms-formmanager logger="forms.model">
    <widgets>
<widget name="form" src="org.apache.cocoon.forms.formmodel.FormDefinitionBuilder"/>
      .....
    </widgets>
  </forms-formmanager>

to Spring config

  <bean id="ServiceSelector/forms-formmanager"
        class="SpringServiceSelector">
    <property name="role" value="o.a.c.f.f.WidgetDefinitionBuilder"
  </bean>
  <bean id="o.a.c.f.f.WidgetDefinitionBuilder/form">
        class="org.apache.cocoon.forms.formmodel.FormDefinitionBuilder">
    ...
  </bean>

IIRC the SpringServiceSelector could lookup other beans by interfaces, right?

Anybody else think this is achievable and make sense?

Ciao

- -- Giacomo Pati
Otego AG, Switzerland - http://www.otego.com
Orixo, the XML business alliance - http://www.orixo.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.1 (GNU/Linux)

iD8DBQFFtdCOLNdJvZjjVZARAgb5AJ9+umep3uBCgpYhq73ieZj5lo0KBACbBDtx
F8P8bRcZ3/rc4L9vXZoF1aQ=
=76mb
-----END PGP SIGNATURE-----

Reply via email to