cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Fagerstrom <dani...@nada.kth.se>
Subject Re: Problems with writing sitemap components as spring beans
Date Sun, 31 Dec 2006 12:36:26 GMT
Carsten Ziegeler skrev:
> Joerg Heinicke wrote:
>> The label has nothing to do with component configuration, so I'd avoid 
>> putting it into the components.
>>
> Yes, you're right.
> 
>>>> and the label is the name after the slash, in this case "mySerializer". It's
not 
>>>> the most elegant way but with C3 we can reconsider it.
>>>>
>>> The label is not the component name (or type) - the label is used for
>>> the cocoon-view feature, e.g. the file generator has the label "content".
>> Exactly. Isn't it possible to add some additional attribute cocoon:label 
>> (or similar) and handle this in a special Cocoon BeanFactory? If there 
>> is nothing like that I wonder how you want to manage pipeline specific 
>> data at all. It would probably be necessary to extend the component 
>> interfaces with additional methods for retrieving such attributes (e.g. 
>> getLabel()).
>>
> Hmm, perhaps we could use the spring authoring functionality (like we do
> for setting up Cocoon) and provide some element (don't quote me on the
> syntax right now, this is just a rough idea):
> <bean name="my.pac.kage.NiceGenerator">
>   ..<!-- Configuration -->..
>   <cocoon:sitemap-component name="nice" label="content"/>
> </bean>
> 
> I think this is possible by creating a proxy around the generator with
> the special sitemap support.

Seem like a good solution.

I've tried to find out how label handling for sitemap components is 
solved now. But didn't found where in the code it is done, can you give 
me a pointer?

/Daniel

Mime
View raw message