Search code examples
jsf-2primefaces

PrimeFaces layout needs manual refresh on FireFox and IE


I am using Primefaces 3.3.1. My use case is very simple, after login user will land on his home page.

Home page is displaying a p:layout with west and center portion.

In Firefox 11 and IE 9 this doesn't show up after login button is pressed but if I do a refresh or reload of the page it displays correctly. But in Chrome after login layout is displayed correctly, no need to do manual refresh.

I am not sure why this is not working for Firefox and IE.

home.xhtml

<!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://java.sun.com/jsf/html"      
    xmlns:p="http://primefaces.org/ui">
<h:head>
</h:head>
<h:body>
<p:layout style="min-width:400px; min-height:200px;">  
    <p:layoutUnit position="west" size="200" header="Left" resizable="true" closable="false" collapsible="true">  
    </p:layoutUnit>  
    <p:layoutUnit position="center">  
    </p:layoutUnit>  
</p:layout>  
</h:body>
</html>

Has anyone encountered similar issue?

In Firebug I don't see any errors.

Update:

It seems this is happening because .ui-layout-unit has visibility = hidden. But why?

enter image description here


Solution

  • I had the same problem, however I followed the initial directions from this thread (serializable and config on the web.xml). Finally I added the <form> tag for the main layout.

    Useful links: