[displaytag-user] Changing Background of a Column
Brought to you by:
fgiust
From: Krishnan, M. <mah...@cs...> - 2004-01-30 20:41:49
|
Hi all, I have a requirement where I need to change the background of a column based on the value. for Example if the Column Value is "Error" I need to make the background color as Red. How do I do this with display tag library. Any help would be appreciated. Thanks Mahesh -----Original Message----- From: Adam Murray [mailto:ad...@fo...] Sent: Tuesday, January 27, 2004 3:14 PM To: dis...@li... Subject: [displaytag-user] making an entire table cell a link? Is it possible to have a table cell be linked, instead of just the text within a cell? I have a column that's defined like this: <display:column property="name" sortable="true" paramId="id" paramProperty="id" title='Name' href='<%=request.getContextPath()+editURL.getPath()%>' /> The problem is there's a lot of data in the table, so fonts are small, and some of these names are short, so it's not very convenient to have to click on the name text. It would be nice to be able to click anywhere in the cell. I came up with a possible solution using a decorator. I changed the above property attribute to property="linkedName", and defined the following method in the decorator: public String getLinkedName() { ProjectForm pF = (ProjectForm) getCurrentRowObject(); return "<fieldset>" + pF.getName() + "</fieldset>"; } Now there's a fieldset tag around the text, which draws a box around the text (almost the size of the cell), and the whole thing is linked. Basically what I wanted, but it looks horrible. The fieldset box is too big vertically, which blows the whole table out of proportion, and I don't think HTML gives a way to shrink it. Any ideas for other ways to achieve this effect? Preferably without javascript? If not, can we make it a feature request? A low-priority feature request since it's a rather minor issue. -Adam ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ displaytag-user mailing list dis...@li... https://lists.sourceforge.net/lists/listinfo/displaytag-user ============================================================================== This message is for the sole use of the intended recipient. If you received this message in error please delete it and notify us. If this message was misdirected, CSFB does not waive any confidentiality or privilege. CSFB retains and monitors electronic communications sent through its network. Instructions transmitted over this system are not binding on CSFB until they are confirmed by us. Message transmission is not guaranteed to be secure. ============================================================================== |