Yes, and by the way put different styleClasses in the condition. I put styleClass2 in both cases by mistake:
styleClass="#{(yourVar.valueToCheck > backingBean.threshold)? 'styleClassConditionIsTrue' : 'styleClassConditionIsFalse'}" Bruno On 2/15/06, Conway. Fintan (IT Solutions) <[EMAIL PROTECTED]> wrote: > It will work because the style is set depending on the row variable > "yourVar". The example shown will work for one column. > > To get this to work for the entire row you will need to add the : > styleClass="#{(yourVar.valueToCheck > backingBean.threshold)? 'styleClass2' : > 'styleClass2'}" > attribute to each column in the row. > > Regards, > > Fintan > > -----Original Message----- > From: Bruno Aranda [mailto:[EMAIL PROTECTED] > Sent: 15 February 2006 10:17 > To: MyFaces Discussion > Subject: Re: Setting CSS Programatically > > > May it seem so, but believe me... I am going to write an example eventually > :-) > > Bruno > > On 2/15/06, Matthias Kahlau <[EMAIL PROTECTED]> wrote: > > > <t:column styleClass="#{(yourVar.valueToCheck > > > > backingBean.threshold)? 'styleClass2' : 'styleClass2'}"/> > > > > Won't this only affect the column style, but not the row style? > > > > > > Regards, > > > > Matthias > > > > > -----Ursprüngliche Nachricht----- > > > Von: [EMAIL PROTECTED] > > > [mailto:[EMAIL PROTECTED] > > > Auftrag von Bruno Aranda > > > Gesendet: Mittwoch, 15. Februar 2006 00:35 > > > An: MyFaces Discussion > > > Betreff: Re: Setting CSS Programatically > > > > > > > > > Yes you can using the t:column. Something like this > > > > > > <t:dataTable var="yourVar" ... > > > > <t:column styleClass="#{(yourVar.valueToCheck > > > > backingBean.threshold)? 'styleClass2' : 'styleClass2'}"/> > > > </t:dataTable> > > > > > > Use a managed bean with the exposed "threshold" variable. > > > > > > Hope that helps, > > > > > > Bruno > > > > > > On 2/14/06, Elam Daly <[EMAIL PROTECTED]> wrote: > > > > Howdy all, > > > > > > > > Is it possible to set the css of row in a dataTable > > > > programmatically? I have a dataTable bound to a UIData component > > > > and I cycle > > > through the rows of > > > > the table and calculate some values. If the value is greater > > > than a certain > > > > threshold, I need to highlight the entire row, say by coloring > > > it red. Is > > > > is possible to manipulate the style for that single row? > > > > > > > > Thanks, > > > > -Elam > > > > > > > > > > > * ** *** ** * ** *** ** * ** *** ** * > This email and any files transmitted with it are confidential and > intended solely for the use of the individual or entity to whom they > are addressed. > Any views or opinions presented are solely those of the author, and do not > necessarily > represent those of ESB. > If you have received this email in error please notify the sender. > > Although ESB scans e-mail and attachments for viruses, it does not guarantee > that either are virus-free and accepts no liability for any damage sustained > as a result of viruses. > > * ** *** ** * ** *** ** * ** *** ** * > >