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
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.
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
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
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).
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
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);
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,
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