struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jon Pearson" <>
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)}">

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.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message