RE: EvenOdd row help

"Steve G" <[email protected]>
Newsgroups gmane.comp.java.tapestry.devel
Message-ID <[email protected]>
Thanks for the responses. I'll probably try the "styles to be set as 
properties " method. This way I don't have to hard code the stype name.

steve





>From: "Mind Bridge" <[email protected]>
>To: "Steve G" 
><[email protected]>,<[email protected]>
>Subject: RE: [Tapestry-developer] EvenOdd row help
>Date: Sun, 15 Dec 2002 18:57:09 +0200
>
>
>Another approach is also to use the context addressing feature of CSS by
>surrounding the areas that need particular formatting with a separate CSS
>class.
>
>For example, you can do
>
><span class="dataset1">
>   <!-- the HTML code that uses class=even and class=odd goes here -->
></span>
>
>and
>
><span class="dataset2">
>   <!-- other HTML code that uses class=even and class=odd goes here -->
></span>
>
>You can then define the styles in the following way:
>
>.dataset1 .even { ... }
>.dataset1 .odd { ... }
>
>.dataset2 .even { ... }
>.dataset2 .odd { ... }
>
>In other words, even if you use a bean emitting even/odd, you can still
>define different appearances at different places using CSS -- the fixed
>class names are not a severe limitation.
>
>Of course, if you want the names to be different, modifying EvenOdd to 
>allow
>the styles to be set as properties and then using <set-property> or
><set-string-property> in the specification (see doc on helper beans) is
>certainly an option.
>
>
>-----Original Message-----
>From: [email protected]
>[mailto:[email protected]]On Behalf Of
>Howard M. Lewis Ship
>Sent: Sunday, December 15, 2002 6:20 PM
>To: Steve G; [email protected]
>Subject: Re: [Tapestry-developer] EvenOdd row help
>
>
>Create a version of EvenOdd where you can specify the CSS class names in
>place of the default "even" and "odd".
>
>The point of helper beans is that they are tiny, easy and self-contained.
>We're talking 18 lines of code here!
>
>http://tapestry.sourceforge.net/doc/clover/net/sf/tapestry/bean/EvenOdd.html
>
>
>----- Original Message -----
>From: "Steve G" <[email protected]>
>To: <[email protected]>
>Sent: Sunday, December 15, 2002 10:43 AM
>Subject: [Tapestry-developer] EvenOdd row help
>
>
> > Hi, I posted this message a few months back but I could not find the
> > response. I am starting to look into tapestry again for an upcoming
> > application and have a question regarding settings the class attribute 
>for
>a
> > row when using Foreach.
> >
> > I've looked at the Portal tutorial which uses the EvenOdd class to
> > accomplish this. Is there any other way of doing it? I don't like the 
>fact
> > that the style sheet class is specified in the java class. I would like
>the
> > designers to control this. Is there anyway to specifiy the style sheet
>class
> > used for the alternating row in the html source or component
>specification?
> > We have pages that use different CSS classes for the alternating rows
>which
> > depends on the dataset that we are outputting. For example, DataSetA 
>would
> > use "altrow1" and "altrow2" for the EvenOdd class attribute, and 
>DataSetB
> > would have "altrow3" and "altrow4" as the EvenOdd class attribute. Both
> > these datasets would be in the same page.
> >
> > thanks,
> > Steve
> >
> >
> > _________________________________________________________________
> > MSN 8 with e-mail virus protection service: 2 months FREE*
> > http://join.msn.com/?page=features/virus
> >
> >
> >
> > -------------------------------------------------------
> > This sf.net email is sponsored by:
> > With Great Power, Comes Great Responsibility
> > Learn to use your power at OSDN's High Performance Computing Channel
> > http://hpc.devchannel.org/
> > _______________________________________________
> > Tapestry-developer mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/tapestry-developer
> >
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:
>With Great Power, Comes Great Responsibility
>Learn to use your power at OSDN's High Performance Computing Channel
>http://hpc.devchannel.org/
>_______________________________________________
>Tapestry-developer mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/tapestry-developer
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:
>With Great Power, Comes Great Responsibility
>Learn to use your power at OSDN's High Performance Computing Channel
>http://hpc.devchannel.org/
>_______________________________________________
>Tapestry-developer mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/tapestry-developer


_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE* 
http://join.msn.com/?page=features/virus



-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.