Re: Referring image using Resource Reference
take a closer look at ContextImage's contructor and its javadoc: /** * Constructor * * @param id * @param contextRelativePath *context-relative path eg codeimages/border.jpg/code */ public ContextImage(String id, String contextRelativePath) so try changing your code to the following: form.add(new ContextImage(images, image/calendarIcon.gif)); that sould work just fine. I think ResourceReference is only applicable if the resource is accessible on the webapps classpath, thus not directly accessible via context and to be served by wicket. On Tue, Jan 5, 2010 at 8:45 AM, vela vela@gmail.com wrote: Hello again, In the project setup, the Page class and their corresponding html files are not placed in the same directory. The Page class are placed under the package com.image and their corresponding html files are placed inside the html directory under the context root. If I place the image file inside the com.image directory or html directory, it is getting called. But I need to call the image file inside the image directory under the context root. In the Page class, the context image has call been called as form.add(new ContextImage(images, new Model(new ResourceReference(image/calendarIcon.gif; -- View this message in context: http://old.nabble.com/Referring-image-using-Resource-Reference-tp27014229p27024782.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Referring image using Resource Reference
Hello again, Thanks its works fine -- View this message in context: http://old.nabble.com/Referring-image-using-Resource-Reference-tp27014229p27025529.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Referring image using Resource Reference
Hello, I have a small issue in referring a image using Resource Reference. The image is placed under the image directory inside the context root. I need to refer to from Page class. How to call the image under the image directory from the the Page class. The page is under the package com.image.
Re: Referring image using Resource Reference
Can't you use ContextImage? On Mon, Jan 4, 2010 at 4:08 PM, sakthi vel vela@gmail.com wrote: Hello, I have a small issue in referring a image using Resource Reference. The image is placed under the image directory inside the context root. I need to refer to from Page class. How to call the image under the image directory from the the Page class. The page is under the package com.image.
Re: Referring image using Resource Reference
Hello again, In the project setup, the Page class and their corresponding html files are not placed in the same directory. The Page class are placed under the package com.image and their corresponding html files are placed inside the html directory under the context root. If I place the image file inside the com.image directory or html directory, it is getting called. But I need to call the image file inside the image directory under the context root. In the Page class, the context image has call been called as form.add(new ContextImage(images, new Model(new ResourceReference(image/calendarIcon.gif; -- View this message in context: http://old.nabble.com/Referring-image-using-Resource-Reference-tp27014229p27024782.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org