Re: Rotating tables? (slightly OT)

2004-08-10 Thread David Schwartz
Oracle - You're in luck. Go to http://asktom.oracle.com & search for "crosstab query". Quoting Nic Werner <[EMAIL PROTECTED]>: >> David Schwartz wrote: >> >> >>>is this possible/smart in JSTL >> >>> >> >>> >> > >> >May be possible but not smart. >> >Should be returned by the database & just displ

Re: Rotating tables? (slightly OT)

2004-08-10 Thread Nic Werner
David Schwartz wrote: is this possible/smart in JSTL May be possible but not smart. Should be returned by the database & just displayed by JSTL. You need a crosstab query. Which database are you using? I'm using Oracle. I've got a crosstab query going now, but what happens is that I'm ge

Re: Rotating tables?

2004-08-05 Thread Stefan Frank
how about just adding an "order by" in jour select-statement?! Or if that is not possible, how about sorting the collection before you display it? Writing a simple Comparator that sorts on the colour and than on the sex should be easy to do: Doing it this way you also have moved some code out o

Re: Rotating tables?

2004-08-04 Thread Helios Alonso
Solution 1: two traversings // display it ... Solution 2: one traversing You could also put: and set old to an inexistent value before the loop, for forcing the opening. I

Re: Rotating tables?

2004-08-04 Thread Nic Werner
Actually, I have the table like that currently, which has a common attribute: To use our running example it looks like: MALE | JOHN | RED MALE | MARK | BLUE MALE | NIC | GREEN MALE | DAVID | BLUE FEMALE | SARA | ORANGE I want to display like:MALE: John (red) | Mark (blue) | Nic (Green) | David (

Re: Rotating tables?

2004-08-04 Thread Helios Alonso
Ups, I misundestood the question. The best would be having logic that returns other collection (not necessarily the BD). But if the tables are coded this way: id sub-id color x 1 red x 2 green x 3 blue y 1 purple y 2 yellow y 3 magenta And there aren't other better solutions (BD transformations o

Re: Rotating tables?

2004-08-04 Thread David Schwartz
>>is this possible/smart in JSTL May be possible but not smart. Should be returned by the database & just displayed by JSTL. You need a crosstab query. Which database are you using? Quoting Helios Alonso <[EMAIL PROTECTED]>: >> I think he wants a table like this: >> >> + John (in red) >> + Mark

Re: Rotating tables?

2004-08-04 Thread Helios Alonso
I think he wants a table like this: + John (in red) + Mark (in blue) + Nic (in green) + Helios (in red) + David (in blue) If you have an array of 3 colors named colors (I dont know but, maybe the set tag can build a mapping that works like an array...) Try this: In the expression you're

Re: Rotating tables?

2004-08-04 Thread Stefan Frank
I'm not exactly sure what you mean with "rotate"?! Do you just have a collection that you want to iterate - with each each entry corresponding to a "row" in the table? Or shall every row display a different "column" of your table? It's hard to understand from your examples.. For displaying tabu

Rotating tables?

2004-08-03 Thread Nic Werner
Greetings, I have a table of data that I'd basically like to rotate, is this possible/smart in JSTL? Basically, I have an attribute with three colors, each one is a different row in a table. 001 Blue data 001 Green data 002 Purple data I want to have one row:001 | Blue Data | Green Data | Purple