This week's giveaway is in the Spring forum.
We're giving away four copies of Learn Spring Security (video course) and have Eugen Paraschiv on-line!
See this thread for details.
Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Define size to h:dataTable

 
Kumar
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My scenario is like this, I have List, I am iterating my list using <h:dataTable> and populate the values in my jsp. I want to define some size to my table whether or not my list contains data. If the list size is increases beyond the Tabel size I don�t want to increase the Table size rather I need to implement vertical scroll bar.

Can any one help me?
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"Kumar",
Please check your private messages.
 
Hari Dhanakoti
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ben Souther,

Can you please reply to the question raised by "Kumar" in this topic
 
Paul Napauleon
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would do that by using css on the datatable. Give it a height property and a overflow-y: scroll.
 
Atul Samnerkar
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can always control the size of the list from the managed bean.
With the help of iterator, restrict the size of the list to say 10 and then bind that list to the datatable.

In case of MVC, View should not decide how much data to be displayed. It should be governed by the controller only. If this is a consistent feature required by you then go for developing the custom tag as per your need.


Thanks & Regards,
Atul Samnerkar
 
navdeep thakur
Greenhorn
Posts: 18
Google App Engine Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,


I want to wrap the empty space between my data and column.

I am using datatable to show values.

Please have a look on attached screen shot.

I have marked empty space in RED color line.

 
navdeep thakur
Greenhorn
Posts: 18
Google App Engine Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
no one can help me in this?

where are all JSF experts??

helloooooo !!!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic