change backcolor of cell in runtime

R

rjl

I have a td column. I want to check a properties file when page is
loaded to set the color. This is what I have :
<td style="background-color:<%#MyColor.getColor%>> and I have tried:
<td style="background-color:<%=MyColor.getColor%>>
I get a formatter exception. If I take the same code and use
<td style="background-color:<%=MyColor.getColor%>> in the body, it
does show the string I have for MyColor.getColor.
Thanks for any help.
 
R

rjl

Thanks for the response, but isn't this the same I have in my post?
<td style="background-color:<%=MyColor.getColor%>>
or are you sayng leave off the last'>', which i think i tried?
 
G

Guest

no its not the same,
I guess that you try to call a property of a class inside HTM so in order to
call it like:

MyControl.Getcolor use Mycontrol-getColor

let me know
 
G

Guest

what is myControl ?

you could try also :
<td style="background-color:" & '<%#MyColor.getColor%>'>
 
R

rjl

Serge,
I am not using MyControl anywhere. MyColor is a class and getColor
returns a string like "blue".

when I use :<%=MyColor.getColor%> in the boyd of HTML, I do get blue in
the HTML.

Thanks,
Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top