Re: Grid cell with customized font color
Geoff, Thanks for your suggestion. It worked out well for me. I'm using severity level as a string value in the cell. I defined css class as the same name as severity level so I skipped getSeverityLevelClass method. Example: In css file: div.Critical{ color: red; } div.Major{ color: orange; } In tml page: ${alarm.severity} Again thank you very much, -victor On Thu, Jul 3, 2008 at 5:46 AM, Geoff Callender < [EMAIL PROTECTED]> wrote: > That would be fine to give one style to the whole column, but I think the > issue is he wants the style to vary based on the value in the cell. > > > On 03/07/2008, at 10:27 PM, Thiago H. de Paula Figueiredo wrote: > > Em Thu, 03 Jul 2008 07:56:48 -0300, Geoff Callender < >> [EMAIL PROTECTED]> escreveu: >> >> ...try putting a div in a t:parameter and varying the div's class, eg. >>> >> >> Why don't you use pure CSS? If the objects in your Grid have a "name" >> property, for example, its cell is generated with . Thus, >> you just need to define a rule like this in you CSS file: >> >> table.t-data-grid td.name { >>background-color: red; >> } >> >> Thiago >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > >
Re: Grid cell with customized font color
That would be fine to give one style to the whole column, but I think the issue is he wants the style to vary based on the value in the cell. On 03/07/2008, at 10:27 PM, Thiago H. de Paula Figueiredo wrote: Em Thu, 03 Jul 2008 07:56:48 -0300, Geoff Callender <[EMAIL PROTECTED] > escreveu: ...try putting a div in a t:parameter and varying the div's class, eg. Why don't you use pure CSS? If the objects in your Grid have a "name" property, for example, its cell is generated with class="name">. Thus, you just need to define a rule like this in you CSS file: table.t-data-grid td.name { background-color: red; } Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Grid cell with customized font color
Em Thu, 03 Jul 2008 07:56:48 -0300, Geoff Callender <[EMAIL PROTECTED]> escreveu: ...try putting a div in a t:parameter and varying the div's class, eg. Why don't you use pure CSS? If the objects in your Grid have a "name" property, for example, its cell is generated with . Thus, you just need to define a rule like this in you CSS file: table.t-data-grid td.name { background-color: red; } Thiago - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Grid cell with customized font color
To get this kind of output... 99 ...try putting a div in a t:parameter and varying the div's class, eg. ${alarm.severityLevel} In java add a getSeverityLevelClass() method that returns the css class as a String. String getSeverityLevelClass() { int level = getAlarm().getSeverityLevel(); switch (level) etc, returning the css class appropriate to the level } Geoff On 03/07/2008, at 4:54 PM, vzhou wrote: Hi, All, I'm using a Grid component to show an alarm table which requires display different font color based on severity level (a string parameter in data model). Any suggestions on how to customize grid cell's font color or background color? Thanks a lot, -victor -- View this message in context: http://www.nabble.com/Grid-cell-with-customized-font-color-tp18252686p18252686.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Grid cell with customized font color
Hi, All, I'm using a Grid component to show an alarm table which requires display different font color based on severity level (a string parameter in data model). Any suggestions on how to customize grid cell's font color or background color? Thanks a lot, -victor -- View this message in context: http://www.nabble.com/Grid-cell-with-customized-font-color-tp18252686p18252686.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Grid cell with customized font color
Hi, All, I'm using a Grid component to show an alarm table which requires display different font color based on severity level (a string parameter in data model). Any suggestions on how to customize grid cell's font color or background color? Thanks a lot, -victor
Grid cell with customized font color
Hi, All, I'm using a Grid component to show an alarm table which requires display different font color based on severity level (a string parameter in data model). Any suggestions on how to customize grid cell's font color or background color? Thanks a lot, -victor