I am using Image component to dynamically display the appropriate image in a list view and the image name may vary for each list item  
item.add(new Image("supplier",supplier+".gif"));
Is this the right way doing it.
 
Thanks
DIpu
 
----- Original Message -----
Sent: Thursday, February 09, 2006 1:11 AM
Subject: Re: [Wicket-user] Display and Hide Images



On 2/8/06, Tim Johnson <[EMAIL PROTECTED]> wrote:
I'm trying to add an image to display on a page using

item.add(new Image("approved","images/check.gif"));

where item is a ListItem.  How can I link this to my app server root as
opposed to the package where the HTML file exists??

dont use Image, that is for resources. add a simple webmarkupcontainer and an attribute modifier that will provide the proper src attribute.
 

I also need to display the image only if a condition is met...if not I don't
want to display the image.


you can override isVisible() to pull visibility or call setVisible() to push visibility on any component.

 
-Igor

Reply via email to