DataTable inside Tabview

UI Components for JSF
Post Reply
mesken
Posts: 68
Joined: 27 Mar 2011, 02:53

10 May 2011, 11:10

I want to know if there are some components that don't work with TabView. I want tu put a DataTable inside one of my Tabs and it is not working as it should. The DataTable appears on top of the Tab. The Tab container is expanded up to the first 3 rows and the rest of the rows are outside as if they were on top. Also the font size seems to be smaller in Tabs
How do I manage it ?

Thanks
Eclipse Helios 3.6 | Glassfish 3.1 | PrimeFaces 2.2.1

cagatay.civici
Prime
Posts: 18616
Joined: 05 Jan 2009, 00:21
Location: Cybertron
Contact:

10 May 2011, 13:15

I use datatables inside tabviews, all good. Can't say much as you haven't read forum posting guide;

http://primefaces.prime.com.tr/forum/vi ... f=3&t=1194

mesken
Posts: 68
Joined: 27 Mar 2011, 02:53

10 May 2011, 14:26

Thanks for your help. This is simply what I did

Code: Select all

<h:body>

	<p:tabView >
			
		<p:tab title="Customers View" >

			<h:form>  
				<p:dataTable var="c" style="height:50px; color:#000000" value="#{controlCustomer.custom}" paginator="true" rows="5" liveScroll="true" selectionMode="single" paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}" rowsPerPageTemplate="10,15,20,25,30,35,40,45,50,55,60">
				    		  
				    <p:column>  
				       <f:facet name="header">Nom de l'utilisateur</f:facet>  
				            <h:outputText value="#{c.name}" />  
				        </p:column>  
				  
				   	<p:column>  
				       <f:facet name="header">Prénom de l'utilisateur</f:facet>  
				           <h:outputText value="#{c.firstName}" />  
				    </p:column>  
				
			</p:dataTable>
				    	  
		</h:form> 

	</p:tab>
				
	<p:tab title="Fist Text">
		<h:outputText value="Text1" />
	</p:tab>

	<p:tab title="Second Text">
		<h:outputText value="Text2" />
	</p:tab>
				
</p:tabView>

</h:body>
Thanks
Eclipse Helios 3.6 | Glassfish 3.1 | PrimeFaces 2.2.1

mesken
Posts: 68
Joined: 27 Mar 2011, 02:53

10 May 2011, 19:01

I am suspenting the <h:form tag, maybe it is not well placed but I haved changed the position of the form in diverse ways, not still working. What surprises me is that it seems so simple but I don't know why it's not working
Eclipse Helios 3.6 | Glassfish 3.1 | PrimeFaces 2.2.1

porthos
Posts: 122
Joined: 09 May 2011, 03:17

11 May 2011, 00:09

Functionally your example works just fine. The problem is your dataTable style of "height:50px". This creates a 50px high div to contain the data table, but it's too big to fit inside, so the rest of the rows spill over.

You can control all this with css. Yes, fonts are smaller inside tabs with default PF styling. Again css.

I suggest you use firebug with firefox, you'll soon see what css is controlling your layout.
-------
PrimeFaces 3.4, Glassfish 3.1.2, Mojarra 2.1.6

mesken
Posts: 68
Joined: 27 Mar 2011, 02:53

11 May 2011, 00:55

Thank very much porthos. It works just fine.

Concerning the use of firebug with firefox. I have been seeing it on this Forum but I had never used it. I just downloaded it and I am a little bit lost, I will send a post for that

Thanks
Eclipse Helios 3.6 | Glassfish 3.1 | PrimeFaces 2.2.1

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 36 guests