Last active
August 29, 2015 14:02
-
-
Save hatemalimam/04a7add36d8bfd666963 to your computer and use it in GitHub Desktop.
forzenColumnsTable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/* Change forzen width */ | |
.ui-datatable-frozenlayout-left { | |
width: 20%; | |
} | |
</style> | |
<script> | |
function slideColumn(comp) { | |
$('.ui-datatable-frozenlayout-left').css("width", comp.input.val()+"%"); | |
} | |
</script> | |
<h:form id="form"> | |
<p:dataTable value="#{mainBean.list}" var="user" frozenColumns="1" | |
scrollable="true" scrollHeight="150" scrollWidth="300"> | |
<p:column headerText="Name"> | |
#{user.name} | |
</p:column> | |
<p:column headerText="Name"> | |
#{user.name} | |
</p:column> | |
<p:column headerText="Name"> | |
#{user.name} | |
</p:column> | |
</p:dataTable> | |
<h:inputHidden id="sliderInput" /> | |
<p:slider for="sliderInput" style="width: 200px" onSlide="slideColumn(this)" minValue="10" maxValue="70" /> | |
</h:form> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment