Time for action – using a ScrollPanel component
Let us see how we can use ScrollPanel to display overflowed content with scrollbars.
- Create a ScrollPanel and set
height
andwidth
using astyle
attribute:<p:scrollPanel style="width:300px;height:250px"> <p:dataTable var="user" value="#{adminController.users}"> <f:facet name="header"> List of Users </f:facet> <p:column headerText="Id"> <h:outputText value="#{user.id}" /> </p:column> <p:column headerText="Email"> <h:outputText value="#{user.emailId}" /> </p:column> <p:column headerText="FirstName"> <h:outputText value="#{user.firstName}" /> </p:column> <p:column headerText="Disabled"> <h:outputText value="#{user.disabled}" /> </p...