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
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
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
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
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 (
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
>>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
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
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
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
10 matches
Mail list logo