Hello,
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 =
this.getAttributeValues(attr,modeConf,objectModel);
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?
[1] http://article.gmane.org/gmane.text.xml.cocoon.devel/69931
[2]
http://svn.apache.org/viewvc/cocoon/trunk/core/cocoon-sitemap/cocoon-sitemap-components/src/main/java/org/apache/cocoon/components/modules/input/ChainMetaModule.java?view=markup
--
Grzegorz Kossakowski