[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tapestry-user
Subject:    Component with mixed functionality?
From:       Kaspar Fischer <fischerk () inf ! ethz ! ch>
Date:       2007-12-11 9:09:49
Message-ID: 2D317AC4-9A2D-4A66-853C-582241AFEA39 () inf ! ethz ! ch
[Download RAW message or body]

Hi!

My page needs to output a table with a fixed, predefined number of rows.
Some of these rows may have empty content and should not be rendered.
Each row has a different type (one is a date, another a string, etc.)
and I want a class of "even" or "odd", respectively, be attached to  
<tr>.

My first attempt was

  <table>
   <tr class="even" jwcid="@If" condition="ognl:object.getProperty 
('title').length()>0">
    <td><span key="object-title">Title</span></td>
    <td><span jwcid="@Insert" value="ognl:object.getProperty 
('title')"/></td>
   </tr>
   <!-- ... and a <tr> for each of the additional properties ... -->

The problem is: the <tr> already is a component (@If) but I need to
attach additional behaviour (class should alternate between "even" and
"odd"). What's an easy way to accomplish this?

Thanks,
Kaspar

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic