cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <>
Subject Re: Compatiblity problem in template block
Date Mon, 19 Jun 2006 19:22:38 GMT
Carsten Ziegeler wrote:
> After some searching I found out why the samples in 2.2 do not work
> anymore. It's an problem caused by removing deprecated stuff in 2.2.
> In 2.1.x with JXTG (not template block!), you can directory refer to
> "request", "response" and "parameters" in your template. We deprecated
> this in favour of always using the prefix "cocoon.".
> Unfortunately when we introduced "cocoon.parameters" we did not store
> the Parameters object but convert the Parameters object into a
> Properties object. So in 2.1.x accessing "parameters" returns a
> Parameters object while accessing "cocoon.parameters" returns a
> Properties object.

Was this ever intended?

> As we have removed the deprecated stuff in the template block and in
> 2.2, there is no way to access the Parameters object anymore. As a
> properties object does not allow to iterate over the stored properties,
> there is no way to simply list all parameters (which makes the samples
> fail).
> Because of compatibility I think we can not simply change this code and
> store the Parameters object under "cocoon.parameters" (although this
> would make most sense to me). So perhaps using something more verbose
> like "cocoon.sitemap-parameters" could be used instead?

This looks more like a hack then a solution. Couldn't we stay with 
Parameters object but provide some additional helper methods that would 
simplify the usage and made it more similar to using Properties object?

Leszek Gawron                            
IT Manager                                         MobileBox sp. z o.o.
+48 (61) 855 06 67                    
mobile: +48 (501) 720 812                       fax: +48 (61) 853 29 65

View raw message