Problem with page reload

UI Components for JSF
Post Reply
smotron
Posts: 7
Joined: 03 Jan 2012, 13:08

03 Jan 2012, 13:18

Hi!
First of all: I'm a beginner, so it is possible that it is a very simple problem, but I can't manage to resolve it. I have a problem with primefaces components and reloading a page by F5 using JSF 2.1.2, Primefaces 3.0 and Tomcat 6. I created a simple Primefaces panel and command buttons. Everything seems to work fine so far. But if I hit F5 for reloading the page, the pretty Primefaces components aren't rendered anymore by primefaces but rather they seem to be rendered by the JSF HTML tag.

Has anyone an idea?

Here is the code for the page:

Code: Select all

<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:p="http://primefaces.org/ui">  
 
<h:head>
  <style>
  ...
  </style>
  
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Hello World</title>
  
</h:head>  
 
<h:body>
 
  <div class="pos">
 
  <p:panel id="panel">
    <f:facet name="header">  
           <h:graphicImage value="/images/blub.png" alt="blub"></h:graphicImage>
    </f:facet> 
    <h:form>
        <h:outputText value="Lorem ipsum" />
        <br/>
        <h:graphicImage value="/images/blub2.png" alt="blub2" width="50"></h:graphicImage>
        <br/>
        <p:commandButton value="Login" action="#{Bean.do}" ajax="false" name="test"></p:commandButton>
    </h:form>
  </p:panel>  
  </div>
</h:body>  
 
</html>
Last edited by smotron on 05 Jan 2012, 10:50, edited 1 time in total.

smithh032772
Posts: 6144
Joined: 10 Sep 2011, 21:10

03 Jan 2012, 21:59

Personally, I would advise against using browser navigation button/options for navigating and/or controlling the output of your JSF web app. I just googled the following, please see below.

stackoverflow f5 refresh jsf.

I'm hoping that you will opt to disable F5 refresh browser option and use navigation options/buttons/menus/etc within your JSF web app.
Howard

PrimeFaces 6.0, Extensions 6.0.0, Push (Atmosphere 2.4.0)
TomEE+ 1.7.4 (Tomcat 7.0.68), MyFaces Core 2.2.9, JDK8
JUEL 2.2.7 | OmniFaces | EclipseLink-JPA/Derby | Chrome

Java EE 6 Tutorial|NetBeans|Google|Stackoverflow|PrimeFaces|Apache

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 51 guests