Author: alexsmirnov
Date: 2009-03-02 19:59:57 -0500 (Mon, 02 Mar 2009)
New Revision: 12796
Added:
trunk/sandbox/samples/layout-sample/src/main/java/org/
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
Removed:
trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.jsp
Modified:
trunk/sandbox/samples/layout-sample/pom.xml
trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.xhtml
trunk/sandbox/ui/layout/pom.xml
trunk/sandbox/ui/layout/src/main/config/component/page.xml
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
Log:
layout components example starts working
Modified: trunk/sandbox/samples/layout-sample/pom.xml
===================================================================
--- trunk/sandbox/samples/layout-sample/pom.xml 2009-03-02 18:00:56 UTC (rev 12795)
+++ trunk/sandbox/samples/layout-sample/pom.xml 2009-03-03 00:59:57 UTC (rev 12796)
@@ -1,11 +1,11 @@
<?xml version="1.0"?><project>
<parent>
<artifactId>samples</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
+ <groupId>org.richfaces</groupId>
<version>3.3.1-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.richfaces.sandbox.samples</groupId>
+ <groupId>org.richfaces.samples</groupId>
<artifactId>layout-sample</artifactId>
<packaging>war</packaging>
<name>layout Maven Webapp</name>
@@ -30,11 +30,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.richfaces.ui</groupId>
- <artifactId>richfaces-ui</artifactId>
- <version>3.3.1-SNAPSHOT</version>
- </dependency>
- <dependency>
<groupId>org.richfaces.framework</groupId>
<artifactId>richfaces-impl</artifactId>
<version>3.3.1-SNAPSHOT</version>
Added: trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
===================================================================
--- trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
(rev 0)
+++
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java 2009-03-03
00:59:57 UTC (rev 12796)
@@ -0,0 +1,12 @@
+/**
+ *
+ */
+package org.richfaces.samples;
+
+/**
+ * @author asmirnov
+ *
+ */
+public class Bean {
+
+}
Property changes on:
trunk/sandbox/samples/layout-sample/src/main/java/org/richfaces/samples/Bean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/faces-config.xml 2009-03-02
18:00:56 UTC (rev 12795)
+++
trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/faces-config.xml 2009-03-03
00:59:57 UTC (rev 12796)
@@ -1,10 +1,14 @@
<?xml version="1.0"?>
-<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.1//EN"
-
"http://java.sun.com/dtd/web-facesconfig_1_1.dtd">
-<faces-config>
+<faces-config
xmlns="http://java.sun.com/xml/ns/javaee"
+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd"
+ version="1.2">
+ <application>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ </application>
<managed-bean>
<managed-bean-name>bean</managed-bean-name>
-
<managed-bean-class>org.richfaces.sandbox.samples.Bean</managed-bean-class>
+ <managed-bean-class>org.richfaces.samples.Bean</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
Modified: trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/web.xml 2009-03-02
18:00:56 UTC (rev 12795)
+++ trunk/sandbox/samples/layout-sample/src/main/webapp/WEB-INF/web.xml 2009-03-03
00:59:57 UTC (rev 12796)
@@ -3,13 +3,17 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Archetype Created Web Application</display-name>
<context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config.xml</param-value>
- </context-param>
- <context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
+ <context-param>
+ <param-name>facelets.VIEW_MAPPINGS</param-name>
+ <param-value>*.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
<context-param>
<param-name>org.richfaces.SKIN</param-name>
Deleted: trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.jsp 2009-03-02
18:00:56 UTC (rev 12795)
+++ trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.jsp 2009-03-03
00:59:57 UTC (rev 12796)
@@ -1,20 +0,0 @@
-<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib
uri="http://labs.jboss.com/jbossrichfaces/ui/ui/layout"
prefix="layout"%>
-<html>
- <head>
- <title>layout sample page</title>
- </head>
- <body>
- <f:view>
- <layout:layoutPanel type="gd">
- <layout:layoutPanel type="u first">
- <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam
nonummy nibh euismod tincidunt ut laoreet dolore magna.</p>
- </layout:layoutPanel>
- <layout:layoutPanel type="u">
- <p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy
nibh euismod tincidunt ut laoreet dolore magna.</p>
- </layout:layoutPanel>
- </layout:layoutPanel>
- </f:view>
- </body>
-</html>
Modified: trunk/sandbox/samples/layout-sample/src/main/webapp/pages/index.xhtml
===================================================================
(Binary files differ)
Modified: trunk/sandbox/ui/layout/pom.xml
===================================================================
--- trunk/sandbox/ui/layout/pom.xml 2009-03-02 18:00:56 UTC (rev 12795)
+++ trunk/sandbox/ui/layout/pom.xml 2009-03-03 00:59:57 UTC (rev 12796)
@@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<parent>
<artifactId>ui</artifactId>
- <groupId>org.richfaces.sandbox</groupId>
+ <groupId>org.richfaces</groupId>
<version>3.3.1-SNAPSHOT</version>
</parent>
<groupId>org.richfaces.ui</groupId>
@@ -36,6 +36,7 @@
<library>
<prefix>org.richfaces</prefix>
<taglib>
+ <
uri>http://richfaces.org/layout</uri>
<shortName>layout</shortName>
</taglib>
</library>
Modified: trunk/sandbox/ui/layout/src/main/config/component/page.xml
===================================================================
--- trunk/sandbox/ui/layout/src/main/config/component/page.xml 2009-03-02 18:00:56 UTC
(rev 12795)
+++ trunk/sandbox/ui/layout/src/main/config/component/page.xml 2009-03-03 00:59:57 UTC
(rev 12796)
@@ -51,7 +51,7 @@
</description>
</property>
<property>
- <name>format</name>
+ <name>markupType</name>
<classname>java.lang.String</classname>
<description>
<![CDATA[Page layout format ( html, xhtml, html-transitional, html-3.2 ) for
encoding DOCTYPE, namespace and Content-Type definitions]]>
Modified:
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java
===================================================================
---
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-03-02
18:00:56 UTC (rev 12795)
+++
trunk/sandbox/ui/layout/src/main/java/org/richfaces/renderkit/AbstractPageRenderer.java 2009-03-03
00:59:57 UTC (rev 12796)
@@ -76,7 +76,7 @@
public String prolog(FacesContext context, UIComponent component) throws IOException {
ResponseWriter out = context.getResponseWriter();
Map<String,Object> attributes = component.getAttributes();
- String format = (String) attributes.get("format");
+ String format = (String) attributes.get("markupType");
String contentType = null;
String namespace = null;
// String characterEncoding = out.getCharacterEncoding();
@@ -116,5 +116,9 @@
//TODO - calculate class.
return "ui-t3";
}
+
+ public boolean hasFacet(UIComponent component, String facet){
+ return null != component.getFacet(facet);
+ }
}
Modified: trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx
===================================================================
--- trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-03-02
18:00:56 UTC (rev 12795)
+++ trunk/sandbox/ui/layout/src/main/templates/org/richfaces/htmlPage.jspx 2009-03-03
00:59:57 UTC (rev 12796)
@@ -5,7 +5,9 @@
xmlns:ui="
http://ajax4jsf.org/cdk/ui"
xmlns:u="
http://ajax4jsf.org/cdk/u"
xmlns:x="
http://ajax4jsf.org/cdk/x"
- class="org.richfaces.renderkit.html.PageRenderer"
+
xmlns:h="http://jsf.exadel.com/header"
+
xmlns:vcp="http://ajax4jsf.org/cdk/vcp"
+ class="org.richfaces.renderkit.html.PageRenderer"
baseclass="org.richfaces.renderkit.AbstractPageRenderer"
component="org.richfaces.component.UIPage"
@@ -21,28 +23,30 @@
</head>
<body x:passThruWithExclusions="value,name,type,id">
<div id="doc3"
class="#{this:documentClass(context,component)}">
- <u:insertFacet name="header">
+ <c:if test="#{this:hasFacet(component,'header')}">
<div id="hd"
x:class="#{component.attributes['headerClass']}">
- <u:insertChild/>
+ <u:insertFacet name="header"/>
</div>
- </u:insertFacet>
+ </c:if>
<div id="bd">
- <u:insertFacet name="sidebar">
+ <c:if test="#{this:hasFacet(component,'sidebar')}">
<div class="yui-b">
- <u:insertChild/>
+ <u:insertFacet name="sidebar"/>
</div>
- </u:insertFacet>
+ </c:if>
+ <vcp:body>
<div class="yui-main">
<div class="yui-b
#{component.attributes['bodyClass']}">
- <u:insertChildren/>
+ <f:call name="renderChildren" />
</div>
</div>
+ </vcp:body>
</div>
- <u:insertFacet name="footer">
+ <c:if test="#{this:hasFacet(component,'footer')}">
<div id="ft"
x:class="#{component.attributes['footerClass']}">
- <u:insertChild/>
+ <u:insertFacet name="footer"/>
</div>
- </u:insertFacet>
+ </c:if>
</div>
</body>
</html>