theme.jar
|
com
|
foo
|_foo.BasePage.class
|_theme.css
|_image1.gif
|_image2.giff
|_...
theme.css is loaded in BasePage's constructor like this:
add(HeaderContributor.forCss(new PackageResourceReference(BasePage.class, "theme.css")));
Thanks!
On Mon, 2006-10-09 at 18:03 +0200, Matej Knopp wrote:
Why don't put the images next to css files and have them attached to
page using css? (background-image can do lot of nice things).
This way you don't have to care about image resources at all.
-Matej
Philip A. Chapman wrote:
> Everyone,
>
> I have several intranet sites that I am working on. All of them should
> have the same basic look, but will have different top menus (for
> navigation). Toward this end, I have created a library (jar) that will
> contain the base page, its markup, and the css and images needed for the
> look of the pages. I load the css from within the base page using a
> PackageResourceReference and intend to do the same with images (which
> will be a bit unwieldy as there are quite a few images and I'll have to
> create wicket components just to point to them).
>
> The problem I have is with the menu. Each web app will have its own
> subclass of my base page and must implement an abstract initHeaderMenu()
> method to install the navigational menu. This navigational menu uses
> images that are provided in my common library. Each subclass can create
> its own PackageResourceReferences using super's class or I can provide
> protected methods in the base class that will return appropriate
> PackageResourceReferences like:
>
> protected PackageResourceReference getMenuLeftGraphic() { ... }
> protected PackageResourceReference getMenuRightGraphic() { ... }
> protected PackageResourceReference getMenuSeperatorGraphic() { ... }
>
> Am I missing anything? Is there an easier way to do this? Plugging in
> the css is easy enough. Plugging in the images seems overly complex.
>
> Thanks,
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys -- and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Wicket-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-user
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user
-- Philip A. Chapman Desktop and Web Application Development: Java, .NET, PostgreSQL, MySQL, MSSQL Linux, Windows 2000, Windows XP |
signature.asc
Description: This is a digitally signed message part
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________ Wicket-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/wicket-user
