Menu

So difficult to modify the style

2006-06-23
2013-03-22
  • Nobody/Anonymous

    I'm having a few issues with Tapestry JSCookMenu, these can be summarised into two areas:

    1. The location of the CSS, properties and images.  The system seems to require these on the class path (and they recommend putting them in a JAR file).  I'm not sure where this idea came from but I would rather integrate these files with my other CSS and images etc.  Also, if I put a CSS into a JAR file I can't then edit this from within Eclipse....

    2. Tapestry catalogues all external items as 'assets'.  Suddenly in JSCookMenu I can load images from the class path.  It also confuses me no end because the BasicJSCookMenuItem I create requires me to define assets and load these, however the default themes still seem to require images in the class path.  It would be simpler if everything worked the same way, ie all images should be defined as assets.

    Have I overlooked something?  I'm going back to explore BasicJSCookMenuItem() further and see if there is not more style stuff I can define myself.

    M Collingwood
    mc (at) focus-computing.com.au

     
    • perseios

      perseios - 2006-06-23

      hi,
      Basically it makes sense to package whole themes into a jar. This allows application developers to just apply a theme by providing the 'theme' attribute if the belonging theme ressources are on the classpath.
      This is the basic idea of Heng Yuan with his JSCookMenu.
      Wrapping it for Tapestry I followed his design.
      Otherwise it would have been kind of very hard to create a 'hello world' menu to get started, because it takes several hours if not days to create quality themes from scratch.
      Note that the default-ressources that belong to a theme must not necessarily be packaged into a jar. They only must be on the classpath.

      So far, we are speaking only about  DEFAULT-ressources for a theme.
      If you want to apply a different css or change icons, you can use standard-Tapestry methods (assets) and have your ressources whereever you like. This is described in the user guide in the section 'Modify some given Theme 'on the fly'

      2: Design goal of the component was to enable easy packaging of themes. To make this as easy as possible, I nearly left the theme-structure unchanged that came from Heng Yuan (the author of JSCookMenu). So there are no asset-declarations in a theme. This is done internally in the component of course. Hope this helps you in your confusion.

      Actually it is a bit hard to create new themes or change them substatially. I know this. But I am not responsable for that, since this comes from JSCookMenu. ;)

      Since this is a serious problem, when the menu's layout has to be adapted to some website's style, currently I am working on a GUI-tool that makes it very very easy to create new themes including shaded backgrounds. Themes can be exported in generic (Heng Yuan) or Tapestry structure. So this tool will not only be helpful to Tapestry users but also to JSF, PHP or whatever users, that use JSCookMenu.

      I hope to release a first version of that tool end of next week. Or late in three weeks.
      May be I release it in this project or make a new sourceforge project. Anyway, it will appear in the news of this project.

       

Log in to post a comment.