Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Primefaces Layout only shows Center when there should be North, South, East and West as well

 
Andy Lukes
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Primefaces 2.2.1
JSF 2.0
Glassfish 3.1.1
netbeans 7.0.1

The layout looks correct when I view their example on their web site. However the example is 3.2 and I am running 2.2.1 due to that being the only rev that netbeans will recognize.

When I check the properties and go to frame works I see JavaServer Faces. server library JSF 2.0 is selected, Registered libraries JSF2.1 is present but the radio button is not selected.

under configuration I show /faces/* grayed out an preferred page language: facelets

under components the component suite is set to none. I select primefaces and save my changes.

When I go back and check the component suite is set to none. Is that my problem?

Is my page set up correctly?




<?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:p="http://primefaces.prime.com.tr/ui"
xmlns:h="http://java.sun.com/jsf/html">
<h:head>
<title>Facelet Title</title>
</h:head>
<h:body>
<p:layout fullPage="true">

<p:layoutUnit position="north" height="100" header="Top" resizable="true" closable="true" collapsible="true">
<hutputText value="Top unit content." />
</p:layoutUnit>

<p:layoutUnit position="south" height="100" header="Bottom" resizable="true" closable="true" collapsible="true">
<hutputText value="South unit content." />
</p:layoutUnit>

<p:layoutUnit position="west" width="200" header="Left" resizable="true" closable="true" collapsible="true">
<h:form id="test">
This fullPage layout consists of five dif
</h:form>
</p:layoutUnit>

<p:layoutUnit position="east" width="200" header="Right" resizable="true" closable="true" collapsible="true" >
<hutputText value="Right unit content." />
</p:layoutUnit>

<p:layoutUnit position="center">
<h:form id="junk">
This fullPage layout consists of five different layoutUnits which are resizable and closable by default.

</h:form>
</p:layoutUnit>

</p:layout> </h:body>
</html>

 
Mahendr Shinde
Ranch Hand
Posts: 38
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You just need to shift layoutUnit of "center" position before all other units.

e.g.:
 
Andy Lukes
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I put the center layout at the beginning as you suggested and that made a big difference. I don't want to say how much time I have spent on this. Thanks!

However, now all layout units are being placed in the upper left corner of the screen. They overlay each other.

 
Andy Lukes
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Changed between revs from Top Bottom Left Right to North South East West. Changed naming and it worked.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!