Bug with p:tabView when using mobile renderset [PF-5.1.13]

UI Components for JSF
Post Reply
nerone
Posts: 27
Joined: 15 Mar 2012, 16:51

19 Mar 2015, 16:34

Hi, i've noticed the following issue with p:tabView and renderKitId="PRIMEFACES_MOBILE". When switching tabs, the content of tab1 is rendered three times.
This is a dead-simple code snippet (doesn't require any beans) easily reproducible on PrimeFaces 5.1.13 @ Mojarra 2.2.10.
Could you please take a look for the next release? (If someone knows what could be triggering this post too :)

thanks&greetings

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"
	xmlns:p="http://primefaces.org/ui" xmlns:pm="http://primefaces.org/mobile" xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
	<f:view contentType="text/html" renderKitId="PRIMEFACES_MOBILE" />
	<h:head>
		<title>MobileTestPage</title>
	</h:head>
	<h:body>
		<pm:page>
			<pm:header fixed="true">
				<h:form id="headerForm">
				 	fheader
				</h:form>
			</pm:header>
			<pm:content style="padding: 0px;">
				 	<p:tabView  activeIndex="0" cache="false" dynamic="true">
						<p:tab title="tab1">
							<h:panelGroup layout="block" style="text-align: center;">
								 	tab1content
							</h:panelGroup>
						</p:tab>
						<p:tab title="tab2">
							<h:panelGroup layout="block" style="text-align: center;">
								 	tab2content
							</h:panelGroup>
						</p:tab>
					</p:tabView>
			</pm:content>
			<pm:footer fixed="true">
				<h:form>
				     footer
				</h:form>
			</pm:footer>
		</pm:page>
	</h:body>
</html>


kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

20 Mar 2015, 01:47

What if you remove the dynamic=true?

nerone
Posts: 27
Joined: 15 Mar 2012, 16:51

20 Mar 2015, 08:36

didn't test it yet (ill update the post accordingly later) - but this is not an option for my case, because i need the second tab to be reloaded from server, since in the first tab changes have been made which require reload

kukeltje
Expert Member
Posts: 9605
Joined: 17 Jun 2010, 13:34
Location: Netherlands

22 Mar 2015, 00:31

It is just for trying... and you can always add a panel in the other tab and explicitly reload/update that. Performance wise also better since reloading takes place on each tab switch, even if no changes were made

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

03 Jul 2015, 12:45


Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 22 guests