Carsten Ziegeler wrote:
Leszek Gawron schrieb:
Carsten Ziegeler wrote:
Leszek Gawron schrieb:
What do you think about exposing cocoon properties in jxtemplate via:
${cocoon.settings.getProperty( 'property-name' )}
or
${cocoon.settings.propertyName}
just to be sure: is this the proper way to obtain current Settings?
final Settings settings =
(Settings)EnvironmentHelper.getCurrentProcessor().getBeanFactory().getBean(Settings.ROLE);
Yes - you should check if getCurrentProcessor() returns null.
Done. Another question: I would like to expose Settings to template as
map (so we can loose that java like settings.getProperty() syntax). What
I am worried about is the fact that this map needs to be recreated for
every request. Maybe Settings could directly implement Map interface? Or
if this breaks the Settings interface design provide Settings.asMap()
that is built during settings reading and never more.
--
Leszek Gawron, IT Manager MobileBox sp. z o.o.
+48 (61) 855 06 67 http://www.mobilebox.pl
mobile: +48 (501) 720 812 fax: +48 (61) 853 29 65