Reputation: 117
I am using a How do I add a vertical scroll bar?
I tried following but that did not work
<t:dataTable style="scroll:auto" class="display dataTable" id="abc" border="1" value="#{ManageBean.selectItems}" var="feed" >
<h:column >
<f:facet name="header">
<h:outputText value="Name" />
</f:facet>
</h:column>
</t:dataTable>
And the jquery code is as follows
$(document).ready(function() {
$('#ManageOutboundIdentitiesForm\\:abc').dataTable( {
"sScrollY": "20px"
} );
});
Upvotes: 0
Views: 3417
Reputation: 6578
Easiest way would be to wrap the dataTable
into a div and add some CSS. Example
<div style="overflow: auto; width: 30%; height: 20%;">
<t:dataTable..../>
</t:dataTable>
</div>
I'm just guessing the sizes for width
and height
here so change them as needed.
Upvotes: 2