Re: T5: Grid's rowClass

2008-03-03 Thread Angelo Chen
hi, might be nice to include that in the tapestry-core as this has a very common use. Howard Lewis Ship wrote: > > Cool idea. I'm trying to come up with a name for this approach, so > > -- View this message in context: http://www.nabble.com/T5%3A-Grid%27s-rowClass-tp13810748p15818201.htm

Re: T5: Grid's rowClass

2008-03-03 Thread Howard Lewis Ship
Cool idea. I'm trying to come up with a name for this approach, so far the best I have is "multi-dimensional reuse". The idea that you can customize not in terms of just what a component does with data, but even where a flow of data comes from, is "subtle and powerful". On Mon, Mar 3, 2008 at 1:

Re: T5: Grid's rowClass

2008-03-03 Thread Davor Hrg
I have something to avoid creating getter for zebra effect the usage is simple or or more than two or any loop just created a wiki page so anyone can try it http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefixCycle Davor Hrg On Mon, Mar 3, 2008 at 9:07 PM, Marcus <[E

Re: T5: Grid's rowClass

2008-03-03 Thread Marcus
Hi Angelo, If we use boolean type for "cssClass", maybe we don't need a set method. private boolean cssClass = false; public String getRowClass() { cssClass = !cssClass; return (cssClass ? "" : "zebra"); } Marcus Angelo Chen wrote: In your tml you define a css class:

Re: T5: Grid's rowClass

2008-03-03 Thread Sven Homburg
impossible since weekend tapestry trunk. tapestry throws an exception like this: class de.hsofttec.tapestry.components.grid.ZebraGrid overrides final method . 2008/3/3, Christian Koeberl <[EMAIL PROTECTED]>: > > You can override and extend Grid like this: > > package com.poi.egh.turntable.ui.co

Re: T5: Grid's rowClass

2008-03-03 Thread Christian Koeberl
You can override and extend Grid like this: package com.poi.egh.turntable.ui.components; /** * Grid component to be used in ProjectX. * * Provides the following extensions to the Tapestry TurntableGrid: * * class="odd" for all odd rows * * * @author Christian Köberl */ public class P

Re: T5: Grid's rowClass

2008-03-03 Thread Ben Tomasini
Does Tapestry itself provide a simpler way to do this? Alternating row styles is very common and it would be nice to have this be more automatic. Ben On Wed, Nov 28, 2007 at 5:54 PM, Angelo Chen <[EMAIL PROTECTED]> wrote: > > Hi, > > In your tml you define a css class: > > > .ze

Re: T5: Grid's rowClass

2007-11-28 Thread Angelo Chen
Hi, In your tml you define a css class: .zebra { background-color: silver; } then in your page class, you put something like this: private int row = 0; public String getRowClass() { if (row % 2 != 0) { return ""; } els

Re: T5: Grid's rowClass

2007-11-28 Thread Ektschn
Sorry, I don't get that, how did you do it? Thanks. found the solution, have to write a getter to set the rowclass in the page class. -- View this message in context: http://www.nabble.com/T5%3A-Grid%27s-rowClass-tf4827079.html#a14007782 Sent from the Tapestry - User mailing list archive at N

Re: T5: Grid's rowClass

2007-11-17 Thread Angelo Chen
found the solution, have to write a getter to set the rowclass in the page class. Angelo Chen wrote: > > Hi, > > The doc says, the rowClass can be used to cycle between CSS values (for > the "zebra effect"), I put one like this: rowclass="literal:zebra", it > applies to all rows in the grid, a