aspose file tools*
The moose likes Struts and the fly likes Scrollbars in tag display:table Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Scrollbars in tag display:table" Watch "Scrollbars in tag display:table" New topic
Author

Scrollbars in tag display:table

p madhavi
Greenhorn

Joined: Jun 10, 2005
Posts: 15
Hi,
I need help regarding the display:table. I have a table which has 20 columns. I am displaying, using <display:table> tag in jsp.I want this table to have a horizontal scrollbar only for last 10 records.
Can anyone help me out.
Thanks in advance.
Soumya Saha
Ranch Hand

Joined: Apr 14, 2006
Posts: 64
Hi Madhavi,
you can use thead :

// add it in the head portion where u have defined ur style Class..

<style >
thead td {
background-color: #00309C;
color: #ffffff;
font-family: arial, helvetica, sans-serif;
font-size: 9pt;
font-style: normal;
font-weight: bold;
text-align: center;
border-top: solid slategray 3px;
position:relative;
top: expression(document.getElementById("dtls").scrollTop-2); /*IE5+ only*/
}
</style>

Now just have this thead on the header row

<table>
// Header Portion
<thead>
<tr>
<td>Column 1</td>
</tr>
</thead>
// Your Logic to display data
</table>

Thanks
p madhavi
Greenhorn

Joined: Jun 10, 2005
Posts: 15
Thanks for the reply.

According to ur suggestions, I tried but it didn't work. I am not sure exactly where I can use it. Here is the my code sample,


<body>
<form ....>
<table>
<tr>
here I have the heading for the table.
</tr>

<tr>
<td>
<display:table .....>
<display:column property=".. " title=".." class=".."
headerClass=".."/>
<display:column ... >
<display:column ... >
and so on....
</display:table>
</td>
</table>
</body>


Could u please guide me...
Thank you.
Soumya Saha
Ranch Hand

Joined: Apr 14, 2006
Posts: 64
Hi madhavi,
Add the Style portion in the <head>.. </head> portion...

Try using a normal table not display table...

Thanks
p madhavi
Greenhorn

Joined: Jun 10, 2005
Posts: 15
Is there any other way, still using display:table ??

Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Scrollbars in tag display:table