cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: [2.2] Problems with local input modules
Date Thu, 20 Dec 2007 14:17:10 GMT
On Dec 20, 2007, at 4:40 AM, Carsten Ziegeler wrote:

> I'm not 100% sure, but I have the feeling that the current way of
> resolving the variables in a sitemap is using the root spring context
> but not the application context of the sitemap in question. This is  
> just
> a guess.
>
> I get the following error. Before I dig deeper into the problem, can
> someone confirm/deny that my above asumption is correct?

Confirmed. Problem is that

> org 
> .apache 
> .cocoon 
> .components 
> .treeprocessor 
> .variables 
> .VariableResolverFactory.getResolver(VariableResolverFactory.java:108)

Ignores passed in manager:

     public static VariableResolver getResolver(String expression,  
ServiceManager manager) throws PatternException {
         if (needsResolve(expression)) {
             VariableResolver resolver;
             try {
                 resolver = (VariableResolver)  
manager.lookup(StringTemplateParserVariableResolver.ROLE);
                 resolver.setExpression(expression);
             } catch (ServiceException e) {
                 throw new PatternException("Couldn't obtain  
VariableResolver.", e);
             }

             return resolver;
         }

         return new NOPVariableResolver(expression);
     }

There is no "resolver.setManager()" or something to pass in currently  
effective manager into VariableResolver so it ends up using global  
service manager.

Vadim

Mime
View raw message