When using a p:tabView with a p:panelGrid with the layout attribute = "grid" data of the second p:tab does not appear, does anyone know how to solve?
Thank's
Error p:tabView
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
I couldn't replicate this issue. Can you please attach a sample code for us to replicate?
Github Profile: https://github.com/mertsincan
Code: Select all
<p:tabView>
<p:tab title="primary">
<p:panel style="display:block; text-align:center;" id="panelPrincipal">
<p:panelGrid [color=#FF0040]layout="grid"[/color] columns="4" style="text-align: left" styleClass="sem-borda" width="70%">
</p:panel>
</p:tab>
<p:tab title="second">
Hello!
</p:tab>
</p:tabView>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
I couldn't replicate the issue. My test xhtml;
Screenshot;
Code: Select all
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:p="http://primefaces.org/ui"
template="/WEB-INF/template.xhtml">
<ui:define name="content">
<div class="ContainerIndent">
<p:panel header="Panel Samples">
<h:form>
<div class="ContainerIndent">
<p:tabView>
<p:tab title="primary">
<p:panel style="display:block; text-align:center;" id="panelPrincipal">
<p:panelGrid layout="grid" columns="4" style="text-align: left" styleClass="sem-borda" width="70%" >
<p:inputText placeholder="Test"/>
<p:inputText placeholder="Test"/>
<p:inputText placeholder="Test"/>
<p:inputText placeholder="Test"/>
</p:panelGrid>
</p:panel>
</p:tab>
<p:tab title="second">
Hello!
</p:tab>
</p:tabView>
</div>
</h:form>
</p:panel>
</div>
</ui:define>
</ui:composition>
Github Profile: https://github.com/mertsincan
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Thanks for the update.
Github Profile: https://github.com/mertsincan
-
- Posts: 2
- Joined: 22 Mar 2016, 13:05
to reproduce the problem :
<p:tab title="11">
<p:panelGrid columns="2" layout="grid">
<p:panelGrid columns="2" >
<h:outputLabel for="ref" value="Réf. :" />
<h:outputText id="ref" value="1198" />
</p:panelGrid >
...
</p:panelGrid>
</p:tab>
<p:tab title="22">
<p:panelGrid columns="2" layout="grid">
<p:panelGrid columns="2" >
<h:outputText value="Contact :" />
<h:outputText value="" />
</p:panelGrid >
</p:panelGrid>
</p:tab>
-> the content of the second tab does not appear
<p:tab title="11">
<p:panelGrid columns="2" layout="grid">
<p:panelGrid columns="2" >
<h:outputLabel for="ref" value="Réf. :" />
<h:outputText id="ref" value="1198" />
</p:panelGrid >
...
</p:panelGrid>
</p:tab>
<p:tab title="22">
<p:panelGrid columns="2" layout="grid">
<p:panelGrid columns="2" >
<h:outputText value="Contact :" />
<h:outputText value="" />
</p:panelGrid >
</p:panelGrid>
</p:tab>
-> the content of the second tab does not appear
-
- Posts: 81
- Joined: 26 Sep 2012, 12:51
Hi wajdopovitch,
this is not a sentinel problem, it's a problem of your grid.
If you define colums=2, you have to have at least 2 columns.
Try something like this...
this is not a sentinel problem, it's a problem of your grid.
If you define colums=2, you have to have at least 2 columns.
Try something like this...
Code: Select all
<p:tab title="11">
<p:panelGrid
columns="2"
layout="grid">
<p:panelGrid columns="2">
<h:outputLabel
for="ref"
value="Réf. :" />
<h:outputText
id="ref"
value="1198" />
</p:panelGrid>
<p:spacer/>
</p:panelGrid>
</p:tab>
<p:tab title="22">
<p:panelGrid
columns="2"
layout="grid">
<p:panelGrid columns="2">
<h:outputText value="Contact :" />
<h:outputText value="" />
</p:panelGrid>
<p:spacer/>
</p:panelGrid>
</p:tab>
Primefaces 8.0.4, MyFaces 2.2.8, Tomcat 9.0.8
-
- Posts: 2
- Joined: 22 Mar 2016, 13:05
effectively the problem is solved with the addition "<p:spacer/>"
RalfScania wrote:Hi wajdopovitch,
this is not a sentinel problem, it's a problem of your grid.
If you define colums=2, you have to have at least 2 columns.
Try something like this...
Code: Select all
<p:tab title="11"> <p:panelGrid columns="2" layout="grid"> <p:panelGrid columns="2"> <h:outputLabel for="ref" value="Réf. :" /> <h:outputText id="ref" value="1198" /> </p:panelGrid> <p:spacer/> </p:panelGrid> </p:tab> <p:tab title="22"> <p:panelGrid columns="2" layout="grid"> <p:panelGrid columns="2"> <h:outputText value="Contact :" /> <h:outputText value="" /> </p:panelGrid> <p:spacer/> </p:panelGrid> </p:tab>
-
- Posts: 5281
- Joined: 29 Jun 2013, 12:38
Glad to hear, thanks for the update
Github Profile: https://github.com/mertsincan
-
- Information
-
Who is online
Users browsing this forum: No registered users and 17 guests