aspose file tools
The moose likes JSF and the fly likes How to print data in h:dataTable by column wise Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » JSF
Reply Bookmark "How to print data in h:dataTable by column wise" Watch "How to print data in h:dataTable by column wise" New topic
Author

How to print data in h:dataTable by column wise

Venkateswarlu Vadde
Greenhorn

Joined: Jan 07, 2006
Posts: 7
I've Arraylist holding of Item objects, in that again one more Arraylist containing Item parameters

My problem is i want to display ItemParams side by side(column wise) not row by row(normal procedure)

Table looks like

ItemNoItemNameItemDescChange
---------------------------------------------------------
234Colgatetoothpastecheckbox
123Pepsodenttoothpastecheckbox

In above table ItemName having different params
colgate have 3params
peopsodent have 2 params

ItemParameters class(bean) containing fields of parameterValue(textBox in UI) and parameterDescription(textArea in UI)

So the total ItemName column looks like

ItemName
--------------------------------------------------------------------------------------------------------------------------------
Colgate
parameterValue parameterDescription,parameterValue parameterDescription,parameterValue parameterDescription

Pepsodent
parameterValue parameterDescription,parameterValue parameterDescription

Cibaca
parameterValue parameterDescription,parameterValue parameterDescription,parameterValue parameterDescription,parameterValue parameterDescription

Please help me
Thanks in advance
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
Not understood your problem exactly. Please paste the code of your item class and any classes it contain for parameters?
[ November 02, 2006: Message edited by: Ali Gohar ]
Venkateswarlu Vadde
Greenhorn

Joined: Jan 07, 2006
Posts: 7
All are POJO classed only (having sets and gets)

i want to display ItemName(as shown above) column(with params) in main table( heading: Table looks like )

My question is how should i display params side by side(column wise)

because when your are having multiple objects, normally we put in h:column, so datatable can iterate and prints row by row

but I want this in column wise

paramValue1 paraDesc1, paramValue2,paraDesc2 etc.,
Ali Gohar
Ranch Hand

Joined: Mar 18, 2004
Posts: 572
I guess try <t:dataList> if you are using MyFaces.
Venkateswarlu Vadde
Greenhorn

Joined: Jan 07, 2006
Posts: 7
Thank you very much Ali Sir
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: How to print data in h:dataTable by column wise
 
Similar Threads
Row Selection problems with JTable
JSON array to Java object
WA #1.....word association
Polymorphism and SOAP Unmarshaling problem
How to move the selected row in Jtable to be the first row in the table