Skip to content

Instantly share code, notes, and snippets.

@hatemalimam
Last active August 29, 2015 14:02
Show Gist options
  • Save hatemalimam/04a7add36d8bfd666963 to your computer and use it in GitHub Desktop.
Save hatemalimam/04a7add36d8bfd666963 to your computer and use it in GitHub Desktop.
forzenColumnsTable
<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