scrollable datatable in layout

Components, Ajax Framework, Utilities and More.
Post Reply
darius
Posts: 5
Joined: 22 Sep 2011, 15:19

22 Sep 2011, 16:14

Hi there!
I use a p:dataTable within a p:layoutUnit, where this layout is embedded into another fullPage-layout. Something like (inner layout only):

Code: Select all

		
<p:layout fullPage="false">
	<p:layoutUnit id="overview" position="north" size="300" 
		resizable="true" collapsible="true"
		header="MyHeader" minSize="200">
		<p:dataTable value="#{myController.list}" var="destination" >
			<p:column>
				<f:facet name="header">Name</f:facet>
				<h:outputText value="#{destination.name}" />
			</p:column>
		</p:dataTable>
	</p:layoutUnit>
	<p:layoutUnit id="edit" position="center" header="lulu" minSize="50">
		<h:outputText value="some text" />
	</p:layoutUnit>
</p:layout>
If the layoutUnit's height gets too small it adds a scrollbar, but the table header is scrolled out of view (as the scroller is not part of the dataTable).

Trying to set scrollable at the dataTable leads to the problem that the scrollHeight has to be set explicitly. As the height changes when the user grabs the layout, it should be dynamically, too.

Code: Select all

scrollable="true" scrollHeight="200">
Is there a way to achive the behaviour: scrollable dataTable within a layout where the height of the table can change?
PrimeFaces 3.4.2; jboss eap 6.1; Mojarra 2.1.19; FF, IE

Post Reply
  • Information
  • Who is online

    Users browsing this forum: Bing [Bot] and 26 guests