Page 1 of 1

Hold menu not refresh all page

Posted: 28 Jun 2016, 21:05
by vished
Dear all,

In the primefaces rio example it refreshs only the content and the Menu will stay.
In my web app the whole page will be reloaded.
Are there any settings which I missed?

Here is my template.xhml:

Code: Select all

<!DOCTYPE html>
<html 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"
	xmlns:pe="http://primefaces.org/ui/extensions"
	xmlns:shiro="http://shiro.apache.org/tags">

<h:head>
	<f:facet name="first">
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta name="viewport"
			content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
	</f:facet>
	<title><h:outputText
			value="#{applicationController.currentJob.siteName}"
			rendered="#{applicationController.currentJob != null and applicationController.currentJob.siteName != null}" />
		<h:outputText value="#{applicationController.mandatory.siteName}"
			rendered="#{applicationController.currentJob == null or applicationController.currentJob.siteName == null}" />
	</title>

	<h:outputScript name="js/ripple-effect.js" library="rio-layout" />
	<h:outputScript name="js/perfect-scrollbar.js" library="rio-layout" />
	<h:outputScript name="js/layout.js" library="rio-layout" />



	<style type="text/css">
#{
layoutBean




.cssCode




}
</style>

<ui:insert name="head" />
</h:head>

<h:body rendered="#{initApplicationBean.check}">


	<p:idleMonitor
		timeout="#{applicationController.currentJob.idleTimeStorageAttachmentDetailPage * 1000}"
		rendered="#{applicationController.currentJob.useIdleStorageAttachmentDetailPage  == true}">
		<p:ajax event="idle"
			listener="#{idleStorageAttachmentDetailPage.onIdle()}" />
	</p:idleMonitor>

	<ui:include src="topbar.xhtml" />

	<div id="wrapper">
		<div id="wrapperIndent">

			<ui:include src="layoutmenu.xhtml" />

			<div id="layout-portlets-cover">

				<ui:insert name="content">
                        Template
                    </ui:insert>

				<div class="Container100">
					<div class="ContainerIndent Fs12 BoldGray FontRobotoRegular">
						<div class="EmptyBox10"></div>
						<h:outputText
							value="#{applicationController.currentJob.footerText}"
							rendered="#{applicationController.currentJob.showFooterText == true}" />
						<h:outputText
							value="#{applicationController.mandatory.footerText}"
							rendered="#{applicationController.mandatory.showFooterText == true and applicationController.currentJob.showFooterText != true}" />
						<div class="EmptyBox10"></div>
					</div>
				</div>
			</div>

			<p:ajaxStatus onstart="PF('statusDialog').show()"
				onsuccess="PF('statusDialog').hide()">
				<f:facet name="start">
					<p:graphicImage name="images/preloader.gif" library="rio-layout" />
				</f:facet>

				<f:facet name="complete">
					<h:outputText value="" />
				</f:facet>
			</p:ajaxStatus>


			<p:dialog widgetVar="statusDialog" modal="true" draggable="false"
				closable="false" resizable="false" showHeader="false">
				<p:graphicImage name="images/preloader.gif" library="rio-layout"
					rendered="#{applicationController.currentJob.loaderCustomerPath == null}" />

				<p:graphicImage
					rendered="#{applicationController.currentJob.loaderCustomerPath != null}"
					value="#{jobCustomLoaderRequestController.doGetLoaderPathCustomer(null)}">
				</p:graphicImage>

			</p:dialog>



		</div>
	</div>

	<h:outputStylesheet library="bootstrap" name="css/bootstrap.css" />
	<h:outputStylesheet name="css/animate.css" library="rio-layout" />
	<h:outputStylesheet name="css/rio-font.css" library="rio-layout" />
	<h:outputStylesheet name="css/ripple-effect.css" library="rio-layout" />
	<h:outputStylesheet name="css/perfect-scrollbar.css"
		library="rio-layout" />
	<h:outputStylesheet name="css/core-layout.css" library="rio-layout" />
	<h:outputStylesheet name="css/font-awesome.css" library="rio-layout" />
	<h:outputStylesheet name="css/rio-layout.css" library="rio-layout" />
	<h:outputStylesheet name="css/custom-theme.css" library="custom-style" />

</h:body>

</html>

Re: Hold menu not refresh all page

Posted: 11 Jul 2016, 14:39
by mert.sincan
Can you please try this issue with new Layout release? And do you get an error on browser's console?

Re: Hold menu not refresh all page

Posted: 11 Jul 2016, 20:31
by vished
No, it´s not working.
Any ideas? The whole page is refreshing my page after I press something from the menu

Re: Hold menu not refresh all page

Posted: 15 Jul 2016, 15:48
by mert.sincan
Do you get an error on browser's console? I tested this issue, but I couldn't replicate. Please attach a sample codes. (exp; layoutmenu.xhtml) Also, can you please try this issue without p:idleMonitor ?

Re: Hold menu not refresh all page

Posted: 16 Jul 2016, 00:23
by vished
hm, it´s the same also here:
http://www.primefaces.org/rio/data.xhtml

I don´t know, in Google Chrome it seems better....

Re: Hold menu not refresh all page

Posted: 28 Jul 2016, 13:47
by mert.sincan
I still couldn't replicate this issue Can you please try with new version or without rio?

Re: Hold menu not refresh all page

Posted: 06 Sep 2016, 20:46
by vished
is there anything wrong in my web.xml ?
How can I solve this?

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns="http://java.sun.com/xml/ns/javaee"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
	version="3.0">
	<servlet-mapping>
		<servlet-name>javax.ws.rs.core.Application</servlet-name>
		<url-pattern>/rest/*</url-pattern>
	</servlet-mapping>
	<context-param>
		<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
		<param-value>/WEB-INF/test.taglib.xml</param-value>
	</context-param>
	<listener>
		<listener-class>com.sun.faces.config.ConfigureListener</listener-class>
	</listener>
	<context-param>
		<param-name>javax.faces.FACELETS_LIBRARIES</param-name>
		<param-value>/WEB-INF/primefaces-rio.taglib.xml</param-value>
	</context-param>

	<context-param>
		<param-name>javax.faces.PROJECT_STAGE</param-name>
		<param-value>Production</param-value>
	</context-param>


	<context-param>
		<param-name>javax.faces.FACELETS_SKIP_COMMENTS</param-name>
		<param-value>true</param-value>
	</context-param>

	<context-param>
		<param-name>javax.faces.VALIDATE_EMPTY_FIELDS</param-name>
		<param-value>true</param-value>
	</context-param>

	<filter>
		<filter-name>Character Encoding Filter</filter-name>
		<filter-class>com.test.util.CharacterEncodingFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>Character Encoding Filter</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
	</filter-mapping>
	<servlet>
		<servlet-name>Faces Servlet</servlet-name>
		<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
	</servlet>
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.jsf</url-pattern>
	</servlet-mapping>
	<servlet-mapping>
		<servlet-name>Faces Servlet</servlet-name>
		<url-pattern>*.xhtml</url-pattern>
	</servlet-mapping>

	<context-param>
		<param-name>primefaces.THEME</param-name>
		<param-value>rio</param-value>
	</context-param>

	<context-param>
		<param-name>com.sun.faces.numberOfViewsInSession</param-name>
		<param-value>3</param-value>
	</context-param>

	<session-config>
		<session-timeout>900</session-timeout>
	</session-config>

	<context-param>
		<param-name>javax.faces.INTERPRET_EMPTY_STRING_SUBMITTED_VALUES_AS_NULL</param-name>
		<param-value>true</param-value>
	</context-param>

	<!-- CHANGE 20.06.2016 from server to client -->
	<context-param>
		<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
		<param-value>client</param-value>
	</context-param>

	<error-page>
		<exception-type>javax.faces.application.ViewExpiredException</exception-type>
		<location>/common/expired.jsf</location>
	</error-page>
	<error-page>
		<exception-type>java.sql.SQLException</exception-type>
		<location>/portal/dashboard.jsf</location>
	</error-page>
	<error-page>
		<exception-type>java.lang.RuntimeException</exception-type>
		<location>/portal/dashboard.jsf</location>
	</error-page>
	<error-page>
		<exception-type>org.apache.shiro.session.InvalidSessionException</exception-type>
		<location>/portal/dashboard.jsf</location>
	</error-page>
	<error-page>
		<error-code>500</error-code>
		<location>/common/404.jsf</location>
	</error-page>
	<error-page>
		<error-code>404</error-code>
		<location>/common/404.jsf</location>
	</error-page>
	<error-page>
		<error-code>400</error-code>
		<location>/common/404.jsf</location>
	</error-page>
	<!-- <context-param> <param-name>com.sun.faces.writeStateAtFormEnd</param-name> 
		<param-value>false</param-value> </context-param> -->

	<filter>
		<filter-name>PrimeFaces FileUpload Filter</filter-name>
		<filter-class>org.primefaces.webapp.filter.FileUploadFilter</filter-class>
	</filter>
	<filter-mapping>
		<filter-name>PrimeFaces FileUpload Filter</filter-name>
		<servlet-name>Faces Servlet</servlet-name>
		<dispatcher>FORWARD</dispatcher>
	</filter-mapping>


	<context-param>
		<param-name>primefaces.UPLOADER</param-name>
		<param-value>commons</param-value>
	</context-param>

	<context-param>
		<param-name>org.primefaces.extensions.DELIVER_UNCOMPRESSED_RESOURCES</param-name>
		<param-value>true</param-value>
	</context-param>

	<context-param>
		<param-name>org.primefaces.extensions.WRAP_PRIME_FACES_RESOURCES</param-name>
		<param-value>true</param-value>
	</context-param>

	<context-param>
		<param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
		<param-value>true</param-value>
	</context-param>

	<filter>
		<filter-name>CharacterEncodingFilter</filter-name>
		<filter-class>com.test.util.CharacterEncodingFilter</filter-class>
		<init-param>
			<description>override any encodings from client</description>
			<param-name>ignore</param-name>
			<param-value>true</param-value>
		</init-param>
		<init-param>
			<description>the encoding to use</description>
			<param-name>encoding</param-name>
			<param-value>UTF-8</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>CharacterEncodingFilter</filter-name>
		<url-pattern>*.jsf</url-pattern>
	</filter-mapping>

	<listener>
		<listener-class>org.apache.shiro.web.env.EnvironmentLoaderListener</listener-class>
	</listener>
	<context-param>
		<param-name>shiroEnvironmentClass</param-name>
		<param-value>org.apache.shiro.web.env.IniWebEnvironment</param-value>
	</context-param>
	<context-param>
		<param-name>shiroConfigLocations</param-name>
		<param-value>classpath:shiro-web.ini</param-value>
	</context-param>
	<filter>
		<filter-name>ShiroFilter</filter-name>
		<filter-class>org.apache.shiro.web.servlet.ShiroFilter</filter-class>
		<async-supported>true</async-supported>
	</filter>
	<filter-mapping>
		<filter-name>ShiroFilter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>INCLUDE</dispatcher>
		<dispatcher>ERROR</dispatcher>
	</filter-mapping>



	<listener>
		<listener-class>org.ocpsoft.rewrite.servlet.impl.RewriteServletRequestListener</listener-class>
	</listener>

	<listener>
		<listener-class>org.ocpsoft.rewrite.servlet.impl.RewriteServletContextListener</listener-class>
	</listener>
	<filter>
		<filter-name>OCPsoft Rewrite Filter</filter-name>
		<filter-class>org.ocpsoft.rewrite.servlet.RewriteFilter</filter-class>
		<async-supported>true</async-supported>
	</filter>
	<filter-mapping>
		<filter-name>OCPsoft Rewrite Filter</filter-name>
		<url-pattern>/*</url-pattern>
		<dispatcher>FORWARD</dispatcher>
		<dispatcher>REQUEST</dispatcher>
		<dispatcher>INCLUDE</dispatcher>
		<dispatcher>ASYNC</dispatcher>
		<dispatcher>ERROR</dispatcher>
	</filter-mapping>

	<!-- <servlet> <servlet-name>PrimePushServlet</servlet-name> <servlet-class>org.primefaces.push.PushServlet</servlet-class> 
		<init-param> <param-name>org.atmosphere.cpr.broadcasterCacheClass</param-name> 
		<param-value>org.atmosphere.cache.UUIDBroadcasterCache</param-value> </init-param> 
		<init-param> <param-name>org.atmosphere.util.IOUtils.readGetBody</param-name> 
		<param-value>true</param-value> </init-param> <init-param> <param-name>org.atmosphere.cpr.sessionSupport</param-name> 
		<param-value>true</param-value> </init-param> <init-param> <param-name>org.atmosphere.cpr.asyncSupport</param-name> 
		<param-value>org.atmosphere.container.JSR356AsyncSupport</param-value> </init-param> 
		<load-on-startup>1</load-on-startup> <async-supported>true</async-supported> 
		</servlet> <servlet-mapping> <servlet-name>PrimePushServlet</servlet-name> 
		<url-pattern>/primepush/*</url-pattern> </servlet-mapping> -->


	<filter>
		<filter-name>cache2days</filter-name>
		<filter-class>org.omnifaces.filter.CacheControlFilter</filter-class>
		<init-param>
			<param-name>expires</param-name>
			<param-value>2d</param-value>
		</init-param>
	</filter>
	<filter-mapping>
		<filter-name>cache2days</filter-name>
		<url-pattern>/*</url-pattern>
	</filter-mapping>


	<mime-mapping>
		<extension>eot</extension>
		<mime-type>application/vnd.ms-fontobject</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>otf</extension>
		<mime-type>font/opentype</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>ttf</extension>
		<mime-type>application/x-font-ttf</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>woff</extension>
		<mime-type>application/x-font-woff</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>pdf</extension>
		<mime-type>application/pdf</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>svg</extension>
		<mime-type>image/svg+xml</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>ttf</extension>
		<mime-type>application/font-sfnt</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>woff</extension>
		<mime-type>application/font-woff</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>woff2</extension>
		<mime-type>application/font-woff2</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>eot</extension>
		<mime-type>application/vnd.ms-fontobject</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>eot?#iefix</extension>
		<mime-type>application/vnd.ms-fontobject</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>svg</extension>
		<mime-type>image/svg+xml</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>svg#exosemibold</extension>
		<mime-type>image/svg+xml</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>svg#exobolditalic</extension>
		<mime-type>image/svg+xml</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>svg#exomedium</extension>
		<mime-type>image/svg+xml</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>svg#exoregular</extension>
		<mime-type>image/svg+xml</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>svg#fontawesomeregular</extension>
		<mime-type>image/svg+xml</mime-type>
	</mime-mapping>
	<mime-mapping>
		<extension>ico</extension>
		<mime-type>image/x-icon</mime-type>
	</mime-mapping>
</web-app>