aspose file tools*
The moose likes JSF and the fly likes JSF dataTable issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "JSF dataTable issue" Watch "JSF dataTable issue" New topic
Author

JSF dataTable issue

Meghna Bhardwaj
Ranch Hand

Joined: Jun 08, 2007
Posts: 109
HI All,

I want to display data using the h:dataTable tags in JSF
The data I am displaying has to be in a format like this:

Name: XXXX
ID: 8989
Age: 32

I have seen several examples on the web that tell you how to display the
data like this:

Name ID Age
XXX 8989 32

Since the dataTable tag only has a sub tag h:column and NO h:row I am having issues with this. Is there a better way to do this? I have implemented the first format I mentioned using h:datable and h:column, so first I just write out all the column headers in column 1 and then I write out all the values in column2. The issue I am facing is that when one of the values is blank the next value gets printed in its place and the data appears wrong, this is really a formatting issue. When data is blank it should leave space for it and then print the next value in the next row. Hope I am making sense, any thoughts will be much appreciated.

Is there a better way to do this maybe by not using h:dataTable (I am using JSF ), is my approach correct?
Regards.
nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
similar post can be find http://www.coderanch.com/t/425459/JSF/java/JSF-datatable
pavan devabhakthuni
Greenhorn

Joined: Sep 09, 2009
Posts: 1
hi
it will help you


<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<t:datatable> tag help you
nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
pavan devabhakthuni wrote:hi
it will help you


<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>

<t:datatable> tag help you


you need "newspaperOrientation" attribute but if your project using using tomahawk then only you can use this tag.
Meghna Bhardwaj
Ranch Hand

Joined: Jun 08, 2007
Posts: 109
Thanks Nitin for pointing me to the other post about the same issue. i am not using Tomahawk, also the code I currently have is like so. The first column just writes out labels for the column names and the second column the values.

nitin pokhriyal
Ranch Hand

Joined: May 19, 2005
Posts: 263
either you have to create new datatable or bind datatable generate columns using tags.. HTMLColumn and HTMLDataTable.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSF dataTable issue