| Issue 108: | Custom CSS per column | |
| Back to list |
Hi,
Is there an easy way to apply a css class per different row?
My problem is that I would like to render differently rows that contain a
boolean flag = false. I tried something like it but won't work..:
<jmesa:tableFacade id="places" items="${places}" maxRows="10"
exportTypes="csv,excel" maxRowsIncrements="10,20,1000" stateAttr="restore"
var="bean">
<jmesa:htmlTable captionKey="places.list">
<c:set var="dtstyle" value=""/>
<c:if test="${bean.active == false}">
<c:set var="dtstyle" value="disable"/>
</c:if>
<jmesa:htmlRow styleClass="${dtstyle}">
<jmesa:htmlColumn property="name" titleKey="place.name" />
.....
A workaround ugly but efficient is to apply the class within the tag like
that..:
<jmesa:htmlColumn property="name" titleKey="place.name" >
<p class="${dtstyle}">${bean.name}</p>
</jmesa:htmlColumn>
I was using displaytag previously and the above code worked like a charm.
Is there an easy solution for my problem?
Thanks!
oscar
Jun 6, 2008
#1
extremec...@gmail.com
Jun 6, 2008
thanks for your quick response! and sorry I posted my question on issues rather than on the wiki. I just thought that the way the wiki is created is more like a recipes page than a place to ask new questions but I will use the wiki from now on.
Jun 6, 2008
Maybe I am missing something but .. how do I create a new page in the wiki? Do we have the rights to edit/create pages?..
Jun 6, 2008
My mistake :). I meant in the Google Groups... http://groups.google.com/group/jmesa
Jun 7, 2008
opps. thanks, I will do so :)
Jun 7, 2008
opps. thanks, I will do so :)
Jul 3, 2008
(No comment was entered for this change.)
Status:
Invalid
|