Error p:tabView

eveban
Posts: 3
Joined: 25 Mar 2014, 14:52

01 Feb 2016, 19:17

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

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

02 Feb 2016, 11:58

I couldn't replicate this issue. Can you please attach a sample code for us to replicate?

eveban
Posts: 3
Joined: 25 Mar 2014, 14:52

03 Feb 2016, 11:50

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>
When put the layout="grid" in a panelGrid data from secondary tab disappear , are hidden.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

03 Feb 2016, 17:23

I couldn't replicate the issue. My test xhtml;

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>
Screenshot;
Image

eveban
Posts: 3
Joined: 25 Mar 2014, 14:52

04 Feb 2016, 19:24

I'll do some more tests and any new notice you

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

05 Feb 2016, 15:33

Thanks for the update.

wajdopovitch
Posts: 2
Joined: 22 Mar 2016, 13:05

22 Mar 2016, 13:17

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

RalfScania
Posts: 81
Joined: 26 Sep 2012, 12:51

23 Mar 2016, 14:15

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>
Primefaces 8.0.4, MyFaces 2.2.8, Tomcat 9.0.8

wajdopovitch
Posts: 2
Joined: 22 Mar 2016, 13:05

23 Mar 2016, 15:34

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>

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

28 Mar 2016, 08:38

Glad to hear, thanks for the update ;)

Locked

Return to “Sentinel”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 3 guests