Re: Simple way to show image on WebPage

2010-12-28 Thread Anton Bessonov
Hi Andrea, thanks for your reply, but this is'nt exactly what I want. ContextImage generate stateless path, also not binded to session. What I need is cryptic path such as for Link-Component. Best regards, Anton add(new ContextImage(icon, images/imageFileName.jpg));

Re: Simple way to show image on WebPage

2010-12-28 Thread Martin Grigorov
Hi Anton, you need custom Resource or ResourceReference to load the image. See org.apache.wicket.markup.html.image.Image.Image(String, ResourceReference) org.apache.wicket.markup.html.image.Image.Image(String, Resource) and different implementations of

Re: Simple way to show image on WebPage

2010-12-28 Thread Anton Bessonov
Hi Martin, thanks! DynamicImageResource does this! Best Regards, Anton Hi Anton, you need custom Resource or ResourceReference to load the image. See org.apache.wicket.markup.html.image.Image.Image(String, ResourceReference) org.apache.wicket.markup.html.image.Image.Image(String, Resource)

Simple way to show image on WebPage

2010-12-24 Thread Anton Bessonov
Hello, I've folder of images such as $PROJECT_ROOT/images/ and in $PROJECT_ROOT/src/main/java/org/myproject/myprofile/MyProfilePage.java: package org.myproject.myprofile; public class MyProfilePage extends WebPage { ... public MyProfilePage() { ... class MyProfileForm extends Form {

Re: Simple way to show image on WebPage

2010-12-24 Thread andrea del bene
Hi Anton, I've used class ContextImage in a situation like this, but folder containing images must be inside WebContent folder, at the same level of WEB-INF folder. In this scenario you should be able to access your images writing something like this add(new ContextImage(icon,