Author: ilya_shaikovsky
Date: 2009-08-24 10:40:14 -0400 (Mon, 24 Aug 2009)
New Revision: 15279
Added:
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/page.css
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/footer_background.png
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/header_background.png
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/page.xhtml
root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml
root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel/
root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml
Log:
continue rf-demo
Added: root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/page.css
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/page.css
(rev 0)
+++
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/css/page.css 2009-08-24
14:40:14 UTC (rev 15279)
@@ -0,0 +1,74 @@
+.rich-page{width:100%;}
+.body{
+ background: #FFFFFF;
+ margin:0px;
+}
+.header_bg{
+ background-image:url(#{resource['rich/img/header_background.png']});
+ border-bottom:1px solid;
+ border-bottom-color:#FFFFFF;
+ background-color:#BED6F8;
+ background-repeat:repeat-x;
+ background-position:top left;
+}
+
+.footer_bg{
+ background-image:url(#{resource['rich/img/footer_background.png']});
+ border-top:1px solid;
+ border-top-color:#FFFFFF;
+ background-color:#BED6F8;
+ background-repeat:repeat-x;
+ background-position:center left;
+}
+
+.menu_col{
+ background:#FFFFFF;
+ vertical-align:top;
+ border-top:2px solid;
+ border-top-color:#BED6F8;
+ border-right:2px solid;
+ border-right-color:#BED6F8;
+ border-bottom:2px solid;
+ border-bottom-color:#BED6F8;
+}
+
+.content_col{
+ background:#FFFFFF;
+ vertical-align:top;
+ width:100%;
+ border-top:2px solid;
+ border-top-color:#BED6F8;
+ border-bottom:2px solid;
+ border-bottom-color:#BED6F8;
+}
+*.menu_col, *.content_col, *.footer_bg{
+ font-family:Arial, Verdana, sans-serif ;
+ color:#000000;
+ font-size:11px;
+}
+*.header_content{
+ font-family:Arial, Verdana, sans-serif;
+ color:#000000;
+ font-size:11px;
+}
+
+
+.page_size {
+ width : 100%
+ height : 100%
+}
+
+
+.header_content {
+ margin : 0px 0px 0px 0px
+ height : 95px position : relative
+}
+
+.spacer{font-size : 1px}
+
+
+.footer_bg_content {
+ margin : 0px 0px 0px 0px
+ height : 45px
+ position : relative
+}
\ No newline at end of file
Added:
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/footer_background.png
===================================================================
(Binary files differ)
Property changes on:
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/footer_background.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/header_background.png
===================================================================
(Binary files differ)
Property changes on:
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/img/header_background.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/page.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/page.xhtml
(rev 0)
+++
root/examples/trunk/richfaces-demo/src/main/webapp/resources/rich/page.xhtml 2009-08-24
14:40:14 UTC (rev 15279)
@@ -0,0 +1,70 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+
xmlns:composite="http://java.sun.com/jsf/composite">
+ <head>
+ <title>page</title>
+ </head>
+<body>
+
+<composite:interface>
+ <composite:attribute name="style" />
+ <composite:attribute name="styleClass"/>
+ <composite:attribute name="headerClass"/>
+ <composite:attribute name="bodyClass"/>
+ <composite:attribute name="sidebarClass"/>
+</composite:interface>
+<composite:implementation>
+<h:outputText value="<!DOCTYPE html PUBLIC "e;-//W3C//DTD XHTML
1.0 Transitional//EN"e;
+"e;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"e;>"
escape="false"/>
+<html>
+<h:head>
+ <title>#{cc.attrs.pageTitle}</title>
+ <composite:renderFacet name="pageHeader"/>
+</h:head>
+<h:body>
+ <h:outputStylesheet name="rich/css/page.css" />
+ <table border="0" cellpadding="0" cellspacing="0"
class="rich-page #{cc.attrs.pageClass}">
+ <tbody>
+ <tr>
+ <td class="header_bg">
+ <div class="header_content rich-page-header
#{cc.attrs.headerClass}">
+ <composite:renderFacet name="header"/>
+ </div>
+ </td>
+ </tr>
+ <tr>
+ <td width="100%" height="100%"
class="bg_tabbody">
+ <table cellpadding="0" cellspacing="0" border="0"
width="100%" height="100%" class="rich-page-content
#{cc.attrs.contentClass}">
+ <tbody>
+ <tr>
+ <td class="menu_col rich-page-sidebar #{cc.attrs.sidebarClass}">
+ <div class="menu_width spacer"
style="width:#{cc.attrs.sidebarWidth}px"></div>
+ <composite:renderFacet name="sidebar"/>
+ </td>
+ <td class="content_col rich-page-body #{cc.attrs.bodyClass}">
+ <composite:insertChildren />
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td class="footer_bg">
+ <div class="footer_bg_content rich-page-footer
#{cc.attrs.footerClass}">
+ <composite:renderFacet name="footer"/>
+ </div>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+</h:body>
+</html>
+</composite:implementation>
+</body>
+</html>
Added:
root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml
(rev 0)
+++
root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel/usage.xhtml 2009-08-24
14:40:14 UTC (rev 15279)
@@ -0,0 +1,55 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:rich="http://java.sun.com/jsf/composite/rich"
+
xmlns:a4j="http://richfaces.org/a4j">
+
+<ui:composition>
+ <h:form>
+ <rich:panel>
+ <f:facet name="header">
+ <h:outputText value="Register form" />
+ </f:facet>
+ <h:panelGrid columns="3">
+ <h:outputText value="Name:" />
+ <h:inputText value="#{userBean.name}" required="true"
+ validatorMessage="Nickname should countains of at least 3 characters"
+ id="name">
+ <a4j:ajax event="blur" execute="@this"
render="namemessage"/>
+ <f:validateLength minimum="3" />
+ </h:inputText>
+ <a4j:outputPanel layout="block" id="namemessage">
+ <h:message for="name" style="color:red"/>
+ </a4j:outputPanel>
+ <h:outputText value="Password" />
+ <h:inputSecret value="#{userBean.password}" id="pass"
required="true"
+ validatorMessage="Password should consist of at least 6 characters"
>
+ <a4j:ajax event="blur" execute="@this"
render="passmessage"/>
+ <f:validateLength minimum="6"/>
+ </h:inputSecret>
+ <a4j:outputPanel layout="block" id="passmessage">
+ <h:message for="pass" style="color:red"/>
+ </a4j:outputPanel>
+ <h:outputText value="Age:" />
+ <h:inputText value="#{userBean.age}" id="age"
required="true"
+ validatorMessage="You must be 21 or older to register">
+ <f:validateLongRange minimum="21" />
+ <a4j:ajax event="blur" execute="@this"
render="agemessage"/>
+ </h:inputText>
+ <a4j:outputPanel layout="block" id="agemessage">
+ <h:message for="age" style="color:red"/>
+ </a4j:outputPanel>
+ </h:panelGrid>
+ <h:commandButton action="#{userBean.store}" value="Register"
type="button">
+ <a4j:ajax execute="@form"/>
+ </h:commandButton>
+ <a4j:outputPanel ajaxRendered="true">
+ <h:outputText value="#{userBean.recordStatus}" id="out"
style="color:green;"/>
+ </a4j:outputPanel>
+ </rich:panel>
+ </h:form>
+</ui:composition>
+
+</html>
\ No newline at end of file
Added: root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml
===================================================================
--- root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml
(rev 0)
+++
root/examples/trunk/richfaces-demo/src/main/webapp/richfaces/outputPanel.xhtml 2009-08-24
14:40:14 UTC (rev 15279)
@@ -0,0 +1,37 @@
+<!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:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets">
+
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="body">
+ <p>
+ <b>a4j:outputPanel</b> component designed to provide next features:
+ <ul>
+ <li><b>Automaticall updates</b> of the child content on Ajax
requests</li>
+ <li>Wrapper component for <b>conditional rendering of nested
elements</b> via Ajax</li>
+ <li><b>Configurable layouts</b>:
+ <ul>
+ <li>inline - rendered as span element</li>
+ <li>block - rendered as div element</li>
+ <li>none - special layout for nested components confitional rendering
cases</li>
+ </ul>
+ </li>
+ <li></li>
+ </ul>
+ </p>
+ <p>
+ In the sample you could see how <b>h:message components inserted
dynamically</b> if exist.
+ Also user record <b>storing status updated automatically</b> after request
without mentioning
+ in <b>render</b> property.
+
+ </p>
+ <fieldset>
+ <legend>Sample</legend>
+ <ui:include src="/richfaces/outputPanel/usage.xhtml" />
+ </fieldset>
+ </ui:define>
+</ui:composition>
+
+</html>
\ No newline at end of file