Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
anand gopalan
Display vertical Scroll bar
January 9, 2013 1:41 AM
Answer

anand gopalan

Rank: Expert

Posts: 403

Join Date: March 2, 2012

Recent Posts

I want to display the vertical scroll bar if I am displaying more than 20 records.

Currently I am using below code in view.jsp. it will display the vertical scroll bar for less than 20 records. i want to give the condition, if i am fetching more than 20 records then display the scroll bar, other wise no. Please let me know how to achieve that.


<div style="overflow-y:scroll;height:352px;width:100%;overflow-x:hidden">
<table border="1" width="100%" >
<tr>
<th>Leave From Date</th>
<th>Leave To Date</th>
<th>Total Leave</th>
<th>Leave Type</th>
<th>Leave Update</th>
</tr>

<c:forEach items="${empHistoryList}" var="empHistory">

<tr>
<td><fmt:formatDate type="date" value="${empHistory.t01LFDATE}"/></td>
<td><fmt:formatDate type="date" value="${empHistory.t01LTDATE}"/></td>
<td><c:out value="${empHistory.t01LNDAY}"/></td>
<td><c:out value="${empHistory.t01LTYPE}"/></td>
<td><fmt:formatDate type="date" value="${empHistory.t01UPDATE}"/></td>

</tr>
</c:forEach>


</table>
</div>
anand gopalan
RE: Display vertical Scroll bar
January 14, 2013 3:10 AM
Answer

anand gopalan

Rank: Expert

Posts: 403

Join Date: March 2, 2012

Recent Posts

Hi,

I fixed my issue. declare like <div style="overflow-y:Auto;height:352px;width:100%;overflow-x:hidden">