A packaged resource that has a variable image based on component value

2009-07-10 Thread Steve Tarlton
I know this is probably very simple to do, but I haven't been able to get my head wrapped around it. I want to create a component within the column of a table that has 6 different images associated to it. Each image is tied to a number as the component is actually an integer representing a state.

Re: A packaged resource that has a variable image based on component value

2009-07-10 Thread Eelco Hillenius
I would vary the packaged resource rather than having a resource vary what it points to. That way, you can let browsers cache the image, and you could potentially move it out of a packaged resource to a static image some day if you'd want it e.g. to get maximum performance. Eelco On Thu, Jul 9,

Re: A packaged resource that has a variable image based on component value

2009-07-10 Thread satar
Okay, I will see if I can figure out how to do that. Currently, I am @Override-ing the getCellCssClass and seeing if I can vary the css resource depending on the corresponding columns value as that is the only idea I had currently on how I could possibly do this. -- View this message in context:

Re: A packaged resource that has a variable image based on component value

2009-07-10 Thread satar
So I decided that I am not experienced enough yet with Wicket or using inmethod DataGrid to try to do images but would like to at least change the background color based on an integer value. This is what I did but still think it is somewhat lame and probably there is a much better approach: For

Re: A packaged resource that has a variable image based on component value

2009-07-10 Thread satar
Seems to have chopped of my return line, which was: return (less than)font style=\background-color: + color + \(greater than) + value + (less than)/font(greater than); (less than) = (greater than) = Hope it works this time satar wrote: So I decided that I am not

Re: A packaged resource that has a variable image based on component value

2009-07-10 Thread satar
This is what I ended up with to include a solution for my colored circle images in case someone else finds the need for such a solution. I am assuming it was a reasonable way to go: ... /* * Checkbox column for the color blind */ if (colorblind) { columns.add(new