Re: Simple way to show image on WebPage
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)); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Simple way to show image on WebPage
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 org.apache.wicket.markup.html.image.resource.DynamicImageResource On Tue, Dec 28, 2010 at 7:16 PM, Anton Bessonov exe...@googlemail.comwrote: 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)); - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Simple way to show image on WebPage
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) and different implementations of org.apache.wicket.markup.html.image.resource.DynamicImageResource On Tue, Dec 28, 2010 at 7:16 PM, Anton Bessonovexe...@googlemail.comwrote: 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)); - 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
Simple way to show image on WebPage
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 { ... // user.getImagePath() return for example images/1 add(new Image(myimage, user.getImagePath())); but it's create 404-link: http://localhost:8081/myproject/resources/org.myproject.myprofile.MyProfilePage/images/1_de_DE What is the best way for this, if I need session-binded images? Thanks! - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: Simple way to show image on WebPage
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, images/imageFileName.jpg)); where 'images' is the folder containing images. 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 { ... // user.getImagePath() return for example images/1 add(new Image(myimage, user.getImagePath())); but it's create 404-link: http://localhost:8081/myproject/resources/org.myproject.myprofile.MyProfilePage/images/1_de_DE What is the best way for this, if I need session-binded images? Thanks! - 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