cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Giacomo Pati <giac...@apache.org>
Subject Re: [RT]: Dynamic variables in the Sitemap / Input Modules revisited
Date Fri, 10 Jan 2003 19:44:16 GMT
On Fri, 10 Jan 2003, Sylvain Wallez wrote:

> Christian Haul wrote:
>
> >On 10.Jan.2003 -- 04:42 PM, Sylvain Wallez wrote:
> >
> >
> >>FYI, I patched a bit VariableResolver in treeprocessor.variables so that
> >>it can be used outside the sitemap context :
> >>
> >>VariableResolver resolver =
> >>VariableResolverFactory.getResolver("{module:name}", manager);
> >>String value = resolver.resolve(objectModel);
> >>if (resolver instanceof Disposable) ((Disposable)resolver).dispose();
> >>
> >>It works but isn't clean since it's not COP, so I'm thinking of turning
> >>it to a component :
> >>
> >>ComponentSelector selector =
> >>manager.lookup(VariableResolverSelector.ROLE + "Selector");
> >>VariableResolver resolver = selector.select("{module:name}");
> >>String value = resolver.resolve();
> >>selector.release(resolver);
> >>
> >>
> >
> >This sounds extremely cool!
> >
>
> Thanks.
>
> And Giacomo is right about the typo : "VariableResolverSelector.ROLE"
> should be "VariableResolver.ROLE". Chatting like we do these days on
> cocoon-dev makes me less careful ;-)

LOL

Giacomo



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message