[Yanel-dev] Patch: Make toolbar replaceable

simon simon at 333.ch
Fri Jan 7 22:37:32 CET 2011


Am 07.01.2011 15:23, schrieb Rob Adamson:
> Hi Simon,
>
> On 6 January 2011 19:28, simon<simon at 333.ch>  wrote:
>> Am 06.01.2011 10:56, schrieb Cedric Staub:
>>> On Thu, Jan 06, 2011 at 10:37:35AM +0100, simon wrote:
>>>> BTW
>>>> i think we should consider to implement the menu into a resource-type.
>>>> this way it would be easy to replace it by another menu (resource-type)
>>> Yes, I think that would be the best course of action too. Do you have
>>> some ideas as to how this could best be done? I would be interested in
>>> implementing this.
>> i think it shouldn't be to hard. there would be a resource which provides
>> the html snippets containing the content of the toolbar  and also a html
>> header snippet which would content references to js and css files needed for
>> the toolbar. it also would provide this js and css files.
>>
>> i would extend such a resource from the usecase-resource which alows the use
>> of jelly. this would make it possible to change the content of the snippets
>> fast and easy.
>>
>> yanel would ask via global resource config for this html snippets and
>> integrate these into the page. similar to now. but now the toolbar/menu
>> content comes from org.wyona.yanel.servlet.menu.Menu.java. and the header
>> snippet is harcoded somwhere.
>>
>> i also think then the step towards ajax menus wouldn't very big anymore.
>>
>> WDOT?
> Sounds good to me. At the moment, constructing a custom toolbar is
> painful as none of the Yanel resource/template infrastructure is
> available.
i was missing these things too.

i just had a look at the code and it seems to be nothing difficult. 
there is already an interface 
org.wyona.yanel.servlet.toolbar.YanelToolbar.java
the resource should implement this. in the yanel servlet it should ask 
for a global resource config and if available use the resource to get 
the snippets. if this global resource config does not exist. it uses the 
old way. this way backwards compatibility shouldn't be a problem.

WDOT?

BTW i added a patch 
http://bugzilla.wyona.com/cgi-bin/bugzilla/show_bug.cgi?id=8092 which 
implements the superfish menu. please review!

simon
> Rob



More information about the Yanel-development mailing list