This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Struts and the fly likes tables, bean representing values over time, how to? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "tables, bean representing values over time, how to?" Watch "tables, bean representing values over time, how to?" New topic
Author

tables, bean representing values over time, how to?

Milan Chud�k
Greenhorn

Joined: Nov 13, 2008
Posts: 2
Hi guys,

I am looking for some pattern in struts (taglib,..) for generation of beans that represent values changing over time.

Let's say you have bean



Then I have list of SomeBean objects, where each instance represent one year

Every example I have seen generate table in this format

year | value
2001 | 3242
2002 | 4564
2003 | 5656

etc.


f.ex. this one from http://struts.improve-technologies.com/intro/index.html


But I'd like to present this in this way

year | 2001 | 2002 | 2003
value| 3242 | 4564 | 5656


that is bean properties as rows not columns,

In this use case we know that we'll have list f.ex. 10 years, but we have many value properties in bean.

Do you have any tips how to achieve it in nice and elegant way?(by nice and elegant I mean layout:collection example)

regards,

milan
Milan Chud�k
Greenhorn

Joined: Nov 13, 2008
Posts: 2
I've forgotten, it can be struts 1 or struts 2, it doesn't matter right now
 
I agree. Here's the link: http://kickstarter.com/rocket-mass-heater
 
subject: tables, bean representing values over time, how to?