cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject ChainMetaModule quirk (possible rewrite?)
Date Wed, 31 Jan 2007 11:28:52 GMT

I'm still working on refactoring Forms and Ajax. Following Daniel's
advice[1] I try to configure LinkRewriterTransformer for needs of
rewriting servlet: links to the resources. I need use ChainMetaModule,
because it has concatation feature (<all-values> configuration option).
Sadly, I've encountered its quirk, take a look at getAttribute method:
    public Object getAttribute( String attr, Configuration modeConf, Map
objectModel )
    throws ConfigurationException {
        Object[] values =
        if (getLogger().isDebugEnabled()) getLogger().debug("result
chaining single for "+attr+" is "+(values != null? values[0] : "null"));
        return (values != null? values[0] : null);

In order to get one value it scans through all modules listing all
possible values! Not only this is inefficient but also narrows possible
usage. Block-path module obviously does not support listing all values
because list would be endless. Given this, ChainMetaModule is useless in
this case.

I would like to ask few questions:
1. Does anyone know why ChainMetaModule behaves the way described above?
2. Would you be happy if I rewritten it from scratch with
back-compatibility in mind?
3. If so, would be happy if I used Java 1.5 features?

Or do you have better options?


Grzegorz Kossakowski

View raw message