Win a copy of TDD for a Shopping Website LiveProject this week in the Testing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Question on table heading and table columne alignment

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a jsp page where a session bean with a Vector of Objects is passed in. I want to display selected fields for each element from this Vector in a table somewhere in the page. The list can be large/long both vertically
and horizontally. The table is to be within a <html:form> and so naturally I would like to have the submit buttons stay on the page while I scrolling through the data table. So I am thinking using <div> to make the table inside the page. I would like to leave the column headings stay above the column data no matter where I scroll into the data table. It seems like I
can do that with two tables, one table with all the column headings, the second table contains the data which will be between the <div> </div> tags in which I can scroll both vertically and horizontally.
I have two problems with this plan:
1. how can I always make the column headings match the corresponding column data, i.e.., when I scroll horizontally on the data table in the <div>, I want the table with the headings also "scroll" accordingly.
2. I want noWrap for all of the columns of the data table in the <div>, since I don't know the largest length of the dynamically supplied data by the session bean, so I can't specify a fixed width for the <td> in this data table in the <div>. because it seems like that if the specified width of <td> is smaller than the length of the real data, wrapping will still happen. So I have a very difficult time aligning the table heading columns with the data table columns that is in the <div> tag.
Any suggestions or help are greatly appreciated very much,
Yani Lee
 
This tiny ad is wafer thin:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic