You could just use the standard tapestry EventOdd bean plus a little ognl:
<binding name="class" value="ognl:beans.evenOdd.next +
(album.isSelected ? ' selected' : '')" />
Something like that anyway..
On 12/5/06, Gurps <[EMAIL PROTECTED]> wrote:
I have a for loop like so:
<component id="albums" type="For">
<binding name="source" value="albums" />
<binding name="value" value="album" />
<binding name="element" value="literal:tr" />
<binding name="class" value="beans.evenOdd.rowClass" />
</component>
and a bean declaration
<bean name="evenOdd" class="mypackage.EvenOdd" />
My .CSS file contains a tr.even, tr.odd, tr.newalbum, etc......
how do i (re)write the EvenOdd class such that i can highlight a row based
on one of the fields in the "album" class?
It's almost like i need to set a value inside the evenOdd class such that
when the loop calls getRowClass() it is derived from the object being
iterated on (album.status). It is the status that i wish to show?
I have seen the source to the standard EvenOdd but how do I pass in a value
to it?
--
View this message in context:
http://www.nabble.com/table-row-class-value-dependent-on-iterated-object-tf2764675.html#a7709035
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Jesse Kuhnert
Tapestry/Dojo team member/developer
Open source based consulting work centered around
dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]