change backcolor of cell in runtime

  • Thread starter Thread starter rjl
  • Start date Start date
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.
 
try this instead

<%#MyColor-getColor%>

Let me know if it helps

regard
serge
 
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?
 
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
 
what is myControl ?

you could try also :
<td style="background-color:" & '<%#MyColor.getColor%>'>
 
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

Back
Top