[Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Peewhy
Hello, I have started using Wicket few weeks ago and I am still unable to find simple solutions to simple problems ! The problem I am facing now (after many others !) is to link to a resource at run time. For example, to link to a css, I am using : link wicket:id=menucss type=text/css in the

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Frank Bille Jensen
Hey On Sun, 2006-07-23 at 08:38 -0700, Peewhy wrote: add(new StyleSheetReference(menucss, getClass(), menu.css)); is getClass() returning the correct class which is in the same package as menu.css? To be sure you could instead use MyPageWhichIsInTheSamePackage.class or something like that.

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Eelco Hillenius
Hello, I have started using Wicket few weeks ago and I am still unable to find simple solutions to simple problems ! The problem I am facing now (after many others !) is to link to a resource at run time. For example, to link to a css, I am using : link wicket:id=menucss type=text/css

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Eelco Hillenius
add(new StyleSheetReference(menucss, new ResourceReference(menu.css))); This looks for menu.css in the same package as your MyApplication. Use the format above instead. Ah, yeah. That too :) Eelco - Take Surveys. Earn

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Peewhy
Thank you very much ! It is not yet fully working, but I have no more exception. I used add(new StyleSheetReference(menucss, getClass(), stylesheets/menu/menu.css)); as Frank said and put the menu.css file where it belongs (the above directory structure starting whe the page class is).

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Eelco Hillenius
Among the remaining problems, is the fact that references to image files inside the css don't work Probably all the same problem of not having them pre-registered. Please could you try using the version in svn (WICKET_1_2 branch), or download the intermediate version at

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Igor Vaynberg
class MyImage extends WebComponent { private int width; private int height; private string url; private string text; public myimage(string id, string url, string text, int width, int height) { super(id); this.url=""> ... } void oncomponenttag(tag tag) { checkcomponenttag(tag, img);

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Eelco Hillenius
Action speaks louder than words... Eelco :) On 7/23/06, Igor Vaynberg [EMAIL PROTECTED] wrote: class MyImage extends WebComponent { private int width; private int height; private string url; private string text; public myimage(string id, string url, string text, int width,

Re: [Wicket-user] How to programatically link to a css or a script ?

2006-07-23 Thread Pierre-Yves Saumont
Thanks Igor ! It looks really smart and works perfectly. I have now to read Eelco's explanations to understand how all this is working, and try 1.2.1. Igor Vaynberg a écrit : class MyImage extends WebComponent { private int width; private int height; private string url; private