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 16:32:16 GMT
On Fri, 10 Jan 2003, 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);

After looking at it a second time:

Should it be:

ComponentSelector selector =
manager.lookup(VariableResolver.ROLE + "Selector");

As the Component Interface is giving the Role name not a Selector.

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