Hi,
I'm trying to make a table containing courses (w. displaytag). Each course should have its own color (red, green etc.) displayed before course name e.g.
[red] math
[blue] english
...
my action is retrieving a rowSetDynaClass (from a DB) with the fields [color, course_name] and distributes it through getMySubjects()
my JSP code looks like this:
My problem is that I want to have a small image icon for the corresponding color in the first column.
I can print the color text perfectly by the line <display:column title="Color" property="color"> but then I couldnt make it an image.
My idea was to access it as an implicit object according to:
displaytag example
Since the dynabean is put in the page scope I access it with:
<s:url value="%{#attr.item}"/>
this would output the beans name e.g. org.apache.commons.beanutils.BasicDynaBean@133650d in the column.
sadly adding the prefix:
<s:url value="%{#attr.item.color}"/>
outputs nothing.
So my question is; what am I doing wrong here? is it a simple syntax error or am I using the wrong approach?
All suggestions are appreciated!
/Joel