struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Pearson" <Jon.Pear...@sixnet.com>
Subject OGNL in HTML tags
Date Thu, 30 Apr 2009 20:57:43 GMT
I'm trying to colorize table rows in a JSP based on the result of a
function call into the Action. Here's what I want to do:

<tr class="%{getStatus(deviceID)}">
...
</tr>

And have the function "String getStatus(long deviceID) { ... }" look up
the status of a device and return a CSS class name (such as 'normal',
'warning', or 'error').

But OGNL doesn't execute in non-Struts2 tags... Is there a
straightforward way to do this? At the moment, I'm thinking I need to
implement my own tag library that will add a Struts2-like "tr" tag.

Thanks!
~Jonathan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message