layout problem

UI Components for JSF
PeaceFace
Posts: 8
Joined: 16 Sep 2011, 10:21

16 Sep 2011, 10:33

hello

i want touse the layout companent of the primefaces
this is the code of my page

Code: Select all

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 
<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">

    <f:view contentType="text/html">
    <h:head>
        </h:head>


        <h:body>
			 <p:layout fullPage="true">
	      <p:layoutUnit position="top" header="TOP" height="50">
	      	      <h:outputText value="Top content." />
	      </p:layoutUnit>
	      <p:layoutUnit position="bottom" header="BOTTOM" height="100">
	      	      <h:outputText value="Bottom content." />
	      </p:layoutUnit>
	      <p:layoutUnit position="left" header="LEFT" width="300">
	      	      <h:outputText value="Left content" />
	      </p:layoutUnit>
	      <p:layoutUnit position="right" header="RIGHT" width="200">
	      	      <h:outputText value="Right Content" />
	      </p:layoutUnit>
	      <p:layoutUnit position="center" header="CENTER">
	      	      <h:outputText value="Center Content" />
	      </p:layoutUnit>
 </p:layout>

        </h:body>
    </f:view>
</html>

and this is the result of my code

Code: Select all

Top content. Bottom content. Left content Right Content Center Content 
i don't know how to use it :?:
can you give me a full page example ?

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

16 Sep 2011, 10:42

viewtopic.php?f=3&t=1194

AND... there are lots of 'online demos' on the primefaces site

PeaceFace
Posts: 8
Joined: 16 Sep 2011, 10:21

16 Sep 2011, 10:53

kukeltje wrote:viewtopic.php?f=3&t=1194

AND... there are lots of 'online demos' on the primefaces site
ok is my page it's true
i saw the showcases but i prefer to find a full page example with highlighting on the principle code that present the component. are you agree with me ?
i use the final version 3.M3 ?
can any one help me

PeaceFace
Posts: 8
Joined: 16 Sep 2011, 10:21

16 Sep 2011, 15:10

can anyone help ?
links, tutorials, source codes , .... ?

PeaceFace
Posts: 8
Joined: 16 Sep 2011, 10:21

16 Sep 2011, 15:45

hello again
when i'm tried this code

Code: Select all

    <html xmlns="http://www.w3.org/1999/xhtml"  
        xmlns:h="http://java.sun.com/jsf/html"  
        xmlns:p="http://primefaces.prime.com.tr/ui">  
      
        <h:head>  
      
        </h:head>  
          
        <h:body>  
 			<p:layout fullPage="true">
	      		<p:layoutUnit position="top" header="TOP" height="50">
	      	    	<h:outputText value="Top content." />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="bottom" header="BOTTOM" height="100">
	      	      	<h:outputText value="Bottom content." />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="left" header="LEFT" width="300">
	      	      	<h:outputText value="Left content" />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="right" header="RIGHT" width="200">
	      	    	<h:outputText value="Right Content" />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="center" header="CENTER">
	      	    	<h:outputText value="Center Content" />
	      		</p:layoutUnit>
 			</p:layout>  
        </h:body>  
    </html>  
i get just the center layout, and i didn't see the others (the top layout, the right layout, the left layout and the bottom layout)
i don't know, where is the problem ?
plz help me

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

16 Sep 2011, 18:37

You should upgrade. Primefaces 0.9 is not supported anymore

PeaceFace
Posts: 8
Joined: 16 Sep 2011, 10:21

16 Sep 2011, 21:50

i'm using the version primefaces-3.0.M3.jar and the same problem
i get the Center layout but the others no
this is my page

Code: Select all

    <html xmlns="http://www.w3.org/1999/xhtml"  
        xmlns:h="http://java.sun.com/jsf/html"  
        xmlns:p="http://primefaces.prime.com.tr/ui">  
      
        <h:head>  
      
        </h:head>  
          
        <h:body>  
 			<p:layout fullPage="true">
	      		<p:layoutUnit position="top" header="TOP" height="50">
	      	    	<h:outputText value="Top content." />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="bottom" header="BOTTOM" height="100">
	      	      	<h:outputText value="Bottom content." />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="left" header="LEFT" width="300">
	      	      	<h:outputText value="Left content" />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="right" header="RIGHT" width="200">
	      	    	<h:outputText value="Right Content" />
	      		</p:layoutUnit>
	      		<p:layoutUnit position="center" header="CENTER">
	      	    	<h:outputText value="Center Content" />
	      		</p:layoutUnit>
 			</p:layout>  
        </h:body>  
    </html>  
plz can anyonhe help me ?
i can't continue working without resolving thisproblem :(

PeaceFace
Posts: 8
Joined: 16 Sep 2011, 10:21

16 Sep 2011, 23:14

Hello again
i have a good news :)
it worked when i used the old version primefaces-2.2.1.jar
i don't understand why that it worked with the old version and don't with the new version :!: :!: :!:
can any one help me for that ?

tandraschko
PrimeFaces Core Developer
Posts: 3979
Joined: 03 Dec 2010, 14:11
Location: Bavaria, DE
Contact:

16 Sep 2011, 23:19

Thomas Andraschko

PrimeFaces | PrimeFaces Extensions

Apache Member | OpenWebBeans, DeltaSpike, MyFaces, BVal, TomEE

Sponsor me: https://github.com/sponsors/tandraschko
Blog: http://tandraschko.blogspot.de/
Twitter: https://twitter.com/TAndraschko

PeaceFace
Posts: 8
Joined: 16 Sep 2011, 10:21

17 Sep 2011, 12:20

hello again
i had the same problem with this new page

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:f="http://java.sun.com/jsf/core"      
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui">
	
    <h:head>
        <title>JSF 2.0 Hello World</title>
    </h:head>
    <h:body>
    	<p:layout fullPage="true">
			<p:layoutUnit position="top" header="TOP" height="50" resizable="true">
				<h:form>
					<h:outputText value="Top content." />
				</h:form>
			</p:layoutUnit>
			<p:layoutUnit position="bottom" header="BOTTOM" height="100" resizable="true">
				<h:form>
					<h:outputText value="Bottom content." />
				</h:form>
			</p:layoutUnit>
			<p:layoutUnit position="left" header="LEFT" width="300" resizable="true">
				<h:form>	
					<h:outputText value="Left content" />
				</h:form>
			</p:layoutUnit>	
			<p:layoutUnit position="right" header="RIGHT" width="200" resizable="true">
				<h:form>
					<h:outputText value="Right Content" />
				</h:form>
			</p:layoutUnit>
			<p:layoutUnit position="center" header="CENTER">
				<h:form>	
					<h:outputText value="Center Content" />
				</h:form>
			</p:layoutUnit>
		</p:layout>
		
	</h:body>
	
	
</html>
(the center layout is visible but the others no :( )
i chenged the old xml name space with the new one
i'm a beginner with the primefaces i didn't understand how it's work
can any one help me ?
Last edited by PeaceFace on 17 Sep 2011, 12:48, edited 2 times in total.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 26 guests