Why not do:
final Image logoImg = new Image("logoimg");
logoImg.add(new SimpleAttributeModifier("src", chemin));
or:
final Image logoImg = new Image("logoimg");
logoImg.add(new AttributeModifier("src", true, new
AbstractReadOnlyModel() {
public final Object getObject() {
// TODO : get the image source that will be updated
dynamically
return chemin;
}
}));
-----Original Message-----
From: Fabien D. [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 22, 2008 9:08 AM
To: [email protected]
Subject: How can i load Image??
Hi everybody,
In my web application, I want to display a Image.
I try to use Image and ResourceReference but I have some problemes
My image is in a folder "stock" in my context of my web aplication :
/stock/domaine/sdoimaine/projet/logo. I try to load it with the real
path, or the context path...
String name_upload = GestionProperties.getProperty("uploadRealdir");
String chemin =
name_upload+File.separator+model_domaine.getObject()+File.separator+mode
l_sous_domaine.getObject()+File.separator+model_nom.getObject()+File.sep
arator+model_logo.getObject();
ResourceReference ref = new ResourceReference(chemin);
Image logoProjet = new Image("logoimg", ref );
And the result is :
http://localhost:8080/appWicket-1.0/resources/org.apache.wicket.Applicat
ion/stock...........
How can I place my RessourceReference in the context?
Thank you in adance
--
View this message in context:
http://www.nabble.com/How-can-i-load-Image---tp17403872p17403872.html
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]