Author: d.bulahov
Date: 2007-04-27 09:24:22 -0400 (Fri, 27 Apr 2007)
New Revision: 588
Added:
trunk/sandbox-samples/panel2-sample/
trunk/sandbox-samples/panel2-sample/.svnignore
trunk/sandbox-samples/panel2-sample/pom.xml
trunk/sandbox-samples/panel2-sample/src/
trunk/sandbox-samples/panel2-sample/src/main/
trunk/sandbox-samples/panel2-sample/src/main/webapp/
trunk/sandbox-samples/panel2-sample/src/main/webapp/META-INF/
trunk/sandbox-samples/panel2-sample/src/main/webapp/META-INF/MANIFEST.MF
trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/
trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml.l4t
trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox-samples/panel2-sample/src/main/webapp/index.jsp
trunk/sandbox-samples/panel2-sample/src/main/webapp/panel.xhtml
trunk/sandbox-samples/panel2-sample/src/main/webapp/panel2.xhtml
trunk/sandbox-samples/simpleTogglePanel2-sample/
trunk/sandbox-samples/simpleTogglePanel2-sample/.svnignore
trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml
trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml.prev
trunk/sandbox-samples/simpleTogglePanel2-sample/src/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Action.java
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Bean.java
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Canon.jpg
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Nikon.jpg
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Olympus.jpg
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/collapse.gif
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/expand.gif
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/index.jsp
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/pages/
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/pages/index.jsp
Modified:
trunk/sandbox-samples/pom.xml
Log:
sample for panel2 and simpleToglePanel2
Added: trunk/sandbox-samples/panel2-sample/.svnignore
===================================================================
--- trunk/sandbox-samples/panel2-sample/.svnignore (rev 0)
+++ trunk/sandbox-samples/panel2-sample/.svnignore 2007-04-27 13:24:22 UTC (rev 588)
@@ -0,0 +1,5 @@
+target
+.settings
+.classpath
+.project
+.exadelproject
Added: trunk/sandbox-samples/panel2-sample/pom.xml
===================================================================
--- trunk/sandbox-samples/panel2-sample/pom.xml (rev 0)
+++ trunk/sandbox-samples/panel2-sample/pom.xml 2007-04-27 13:24:22 UTC (rev 588)
@@ -0,0 +1,30 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>richfaces-samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.0.1-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>panel2-sample</artifactId>
+ <packaging>war</packaging>
+ <name>panel2-sample Maven Webapp</name>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>panel2</artifactId>
+ <version>3.0.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces</artifactId>
+ <version>3.0.1-SNAPSHOT</version>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <finalName>panel2-sample</finalName>
+ </build>
+</project>
\ No newline at end of file
Added: trunk/sandbox-samples/panel2-sample/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- trunk/sandbox-samples/panel2-sample/src/main/webapp/META-INF/MANIFEST.MF
(rev 0)
+++ trunk/sandbox-samples/panel2-sample/src/main/webapp/META-INF/MANIFEST.MF 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path:
+
Added: trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,11 @@
+<?xml version="1.0"?>
+<!DOCTYPE faces-config PUBLIC "-//Sun Microsystems, Inc.//DTD JavaServer Faces
Config 1.0//EN"
+
"http://java.sun.com/dtd/web-facesconfig_1_0.dtd">
+<faces-config>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
+
Added: trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml.l4t
===================================================================
--- trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml.l4t
(rev 0)
+++
trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/faces-config.xml.l4t 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess">
+ <PROCESS-ITEM ENTITY="JSFProcessGroup" NAME="rules:#panel.xhtml"
+ PATH="/panel.xhtml" SHAPE="98,111,0,0"
persistent="true"/>
+</PROCESS>
Added: trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ trunk/sandbox-samples/panel2-sample/src/main/webapp/WEB-INF/web.xml 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
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">
+ <description>Richfaces Panel Sample</description>
+ <display-name>panel-sample</display-name>
+ <context-param>
+<param-name>com.exadel.vcp.SKIN</param-name>
+<param-value>#{skinBean.skin}</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>facelets.REFRESH_PERIOD</param-name>
+ <param-value>2</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>com.sun.faces.verifyObjects</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
+ <param-value>com.sun.facelets.FaceletViewHandler</param-value>
+ </context-param>
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/sandbox-samples/panel2-sample/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox-samples/panel2-sample/src/main/webapp/index.jsp
(rev 0)
+++ trunk/sandbox-samples/panel2-sample/src/main/webapp/index.jsp 2007-04-27 13:24:22 UTC
(rev 588)
@@ -0,0 +1,7 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+ <body>
+ <jsp:forward page="panel.jsf" />
+ </body>
+</html>
\ No newline at end of file
Added: trunk/sandbox-samples/panel2-sample/src/main/webapp/panel.xhtml
===================================================================
--- trunk/sandbox-samples/panel2-sample/src/main/webapp/panel.xhtml
(rev 0)
+++ trunk/sandbox-samples/panel2-sample/src/main/webapp/panel.xhtml 2007-04-27 13:24:22
UTC (rev 588)
@@ -0,0 +1,54 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:panel="http://richfaces.ajax4jsf.org/panel2"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
+ >
+<head>
+<style>
+.my {
+ border: 2px solid yellow;
+}
+</style>
+</head>
+<body>
+
+<h:form>
+<h:selectOneRadio binding="#{skinBean.component}" />
+<h:commandLink action="#{skinBean.change}" value="set skin" />
+</h:form>
+
+ <h:outputLink value="panel2.jsf">Sample 2</h:outputLink>
+ <panel:panel2>
+ <a4j:facet name="header">
+ Test
+ </a4j:facet>
+ <panel:panel2>
+ <a4j:facet name="header">
+ Test
+ </a4j:facet>
+ <panel:panel2>
+ <a4j:facet name="header">
+ Test
+ </a4j:facet>
+ Body text
+ </panel:panel2>
+ </panel:panel2>
+ </panel:panel2>
+ <br/>
+ <panel:panel2>
+ <a4j:facet name="header">
+ Test<br/>
+ Test<br/>
+ Test<br/>
+ Test<br/>
+ Test<br/>
+ </a4j:facet>
+ <h:form>
+ <h:outputText value="inside the form"/>
+ </h:form>
+ </panel:panel2>
+</body>
+</html>
Added: trunk/sandbox-samples/panel2-sample/src/main/webapp/panel2.xhtml
===================================================================
--- trunk/sandbox-samples/panel2-sample/src/main/webapp/panel2.xhtml
(rev 0)
+++ trunk/sandbox-samples/panel2-sample/src/main/webapp/panel2.xhtml 2007-04-27 13:24:22
UTC (rev 588)
@@ -0,0 +1,137 @@
+<!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:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:panel="http://richfaces.ajax4jsf.org/panel2"
+
xmlns:a4j="https://ajax4jsf.dev.java.net/ajax">
+<head>
+<style>
+ .panel {
+ vertical-align:top;
+ }
+ .rich-panel-header {
+ color:#F00;
+
+ }
+ .top {
+ width:200px;height:100px;
+ }
+ .hea {
+ color:#FCC;
+ }
+ .bo {
+ color:#F00;
+ }
+
+ .top2 {
+ width:200px;height:100px;
+ border:2px solid #4C9600;
+ background-color:#E4FFC8;
+ }
+
+
+.hea2 {
+ background-image : url();
+ background-color : #4C9600;
+ text-align:center;
+ vertical-align:middle;
+ color:#CFF;
+ padding:4px 0;
+ }
+
+ .bo2 {
+ color:#4C9600;
+ }
+ .bo3 {
+ height:100px;
+ overflow:auto;
+ }
+
+</style>
+</head>
+<body>
+<h:form>
+<h:selectOneRadio binding="#{skinBean.component}" />
+<h:commandLink action="#{skinBean.change}" value="set skin" />
+</h:form>
+<h:outputLink value="panel.jsf">Sample 1</h:outputLink>
+ <h:panelGrid columnClasses="panel" border="0"
columns="3">
+ <panel:panel2 styleClass="top">
+ <a4j:facet name="header">
+ <h:panelGroup>
+ dsdsdsdsd<br />sdsd
+ </h:panelGroup>
+
+ </a4j:facet>
+
+ This is <b>default</b> panel. content here
+ </panel:panel2>
+ <panel:panel2 styleClass="top" headerClass="hea"
bodyClass="bo">
+ <a4j:facet name="header">
+ <h:outputText value="Header of the Panel" />
+ </a4j:facet>
+ This panel contains custom headerClass and bodyClass
+ </panel:panel2>
+ <panel:panel2 styleClass="top2" headerClass="hea2"
bodyClass="bo2">
+ <a4j:facet name="header">
+ <h:outputText
+ value="Header of the Panel" />
+ </a4j:facet>
+ This panel also contains custom headerClass and bodyClass. The background is not a
3D anymore.
+ </panel:panel2>
+
+ <h:panelGroup>
+ <h:form>
+ <panel:panel2
+
onmouseover="document.getElementById(this.id+'_header').style.background='#60BA01';document.getElementById(this.id+'_body').style.background='#F4FFF8'"
+
onmouseout="document.getElementById(this.id+'_header').style.background='#4C9600';document.getElementById(this.id+'_body').style.background='#E4FFC8'"
+ style="width:200px;" headerClass="hea2"
bodyClass="bo3">
+ <a4j:facet name="header">
+ <h:outputText
+ value="Header of the Panel" />
+ </a4j:facet>
+ Base on the previous layout, but form element and javascript behaviour are added
+ <br />
+ <h:inputText />
+ </panel:panel2>
+ </h:form>
+ </h:panelGroup>
+
+ <panel:panel2 style="width:200px;" headerClass="hea"
bodyClass="bo3">
+ <a4j:facet name="header">
+ <h:outputText
+ value="Scrolling Text Panel" />
+ </a4j:facet>
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+ Long Text Long Text Long Text
+
+ </panel:panel2>
+
+ <panel:panel2 styleClass="top">
+ This is a panel without the header
+
+ </panel:panel2>
+ </h:panelGrid>
+ <panel:panel2 style="position: absolute; top: 116px; right: 100px; "
styleClass="top">
+ <a4j:facet name="header">
+ <h:outputText value="Header of the Panel" />
+ </a4j:facet>
+
+ This is a panel with absolute position on the screen.<br/>
+ Resize the browser's window for fun.
+ </panel:panel2>
+
+</body>
+</html>
Modified: trunk/sandbox-samples/pom.xml
===================================================================
--- trunk/sandbox-samples/pom.xml 2007-04-27 13:19:03 UTC (rev 587)
+++ trunk/sandbox-samples/pom.xml 2007-04-27 13:24:22 UTC (rev 588)
@@ -239,5 +239,7 @@
</profiles>
<modules>
<module>scrollable-grid-demo</module>
+ <module>panel2-sample</module>
+ <module>simpleTogglePanel2-sample</module>
</modules>
</project>
\ No newline at end of file
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/.svnignore
===================================================================
--- trunk/sandbox-samples/simpleTogglePanel2-sample/.svnignore
(rev 0)
+++ trunk/sandbox-samples/simpleTogglePanel2-sample/.svnignore 2007-04-27 13:24:22 UTC
(rev 588)
@@ -0,0 +1,5 @@
+target
+
+.settings
+.classpath
+.project
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml
===================================================================
--- trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml (rev
0)
+++ trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml 2007-04-27 13:24:22 UTC (rev
588)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?><project
xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>richfaces-samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.0.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>simpleTogglePanel2-sample</artifactId>
+ <packaging>war</packaging>
+ <name>webapp Maven Webapp</name>
+ <build>
+ <finalName>simpleTogglePanel2-sample</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>simpleTogglePanel2</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml.prev
===================================================================
--- trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml.prev
(rev 0)
+++ trunk/sandbox-samples/simpleTogglePanel2-sample/pom.xml.prev 2007-04-27 13:24:22 UTC
(rev 588)
@@ -0,0 +1,32 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>richfaces-samples</artifactId>
+ <groupId>org.richfaces</groupId>
+ <version>3.0.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.richfaces</groupId>
+ <artifactId>simpleTogglePanel-sample</artifactId>
+ <packaging>war</packaging>
+ <name>webapp Maven Webapp</name>
+ <build>
+ <finalName>simpleTogglePanel-sample</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>simpleTogglePanel</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>common</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>skins</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Action.java
===================================================================
---
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Action.java
(rev 0)
+++
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Action.java 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,16 @@
+package org.richfaces;
+
+import javax.faces.event.AbortProcessingException;
+import javax.faces.event.ActionEvent;
+import javax.faces.event.ActionListener;
+
+
+
+
+public class Action implements ActionListener
+{
+ public void processAction(ActionEvent event) throws AbortProcessingException
+ {
+ System.out.println("wtf");
+ }
+}
\ No newline at end of file
Added:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Bean.java
(rev 0)
+++
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/java/org/richfaces/Bean.java 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,107 @@
+/**
+ * License Agreement.
+ *
+ * JBoss RichFaces 3.0 - Ajax4jsf Component Library
+ *
+ * Copyright (C) 2007 Exadel, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License version 2.1 as published by the Free Software Foundation.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+package org.richfaces;
+
+import javax.faces.event.ActionEvent;
+
+
+/**
+ * @author $Autor$
+ */
+public class Bean {
+
+ private String textValue1 = "Click here to switch panel.";
+ private String canon = "First toggle panel (Client switch type).";
+ private String nikon = "Second toggle panel (Ajax switch type).";
+ private String olympus = "Third toggle panel (Server switch type).";
+ private String width = "80%";
+ private String height = "150px";
+ private String style = "width: 50%; border: 2px solid gold;";
+
+
+ public String getStyle() {
+ return style;
+ }
+
+ public void setStyle(String style) {
+ this.style = style;
+ }
+
+ public String getWidth() {
+ return width;
+ }
+
+ public void setWidth(String width) {
+ this.width = width;
+ }
+
+ public String getHeight() {
+ return height;
+ }
+
+ public void setHeight(String height) {
+ this.height = height;
+ }
+
+ public String getTextValue1() {
+ return textValue1;
+ }
+
+ public void setTextValue1(String textValue1) {
+ this.textValue1 = textValue1;
+ }
+
+ public String getCanon() {
+ return canon;
+ }
+
+ public void setCanon(String canon) {
+ this.canon = canon;
+ }
+
+ public String getNikon() {
+ return nikon;
+ }
+
+ public void setNikon(String nikon) {
+ this.nikon = nikon;
+ }
+
+ public String getOlympus() {
+ return olympus;
+ }
+
+ public void setOlympus(String olympus) {
+ this.olympus = olympus;
+ }
+
+ public String action() {
+ System.out.println("Action!!!");
+ return "null";
+ }
+
+ public void actionListener(ActionEvent event) {
+ System.out.println("ActionEvent on " + event.getComponent().getId() +
" & Phase is "+ event.getPhaseId());
+ }
+
+
+}
\ No newline at end of file
Added:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,21 @@
+<?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>
+ <managed-bean>
+ <managed-bean-name>bean</managed-bean-name>
+ <managed-bean-class>org.richfaces.Bean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>skinBean</managed-bean-name>
+ <managed-bean-class>org.richfaces.SkinBean</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+ <managed-bean>
+ <managed-bean-name>action</managed-bean-name>
+ <managed-bean-class>org.richfaces.Action</managed-bean-class>
+ <managed-bean-scope>session</managed-bean-scope>
+ </managed-bean>
+</faces-config>
+
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/WEB-INF/web.xml 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
+
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>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <filter>
+ <display-name>Ajax4jsf Filter</display-name>
+ <filter-name>ajax4jsf</filter-name>
+ <filter-class>org.ajax4jsf.Filter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>ajax4jsf</filter-name>
+ <servlet-name>Faces Servlet</servlet-name>
+ <dispatcher>REQUEST</dispatcher>
+ <dispatcher>FORWARD</dispatcher>
+ <dispatcher>INCLUDE</dispatcher>
+ </filter-mapping>
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+ <login-config>
+ <auth-method>BASIC</auth-method>
+ </login-config>
+</web-app>
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Canon.jpg
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Canon.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Nikon.jpg
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Nikon.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Olympus.jpg
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/Olympus.jpg
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/collapse.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/collapse.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/expand.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/images/expand.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/index.jsp
(rev 0)
+++ trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/index.jsp 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,8 @@
+<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
+<html>
+<head></head>
+
+<body>
+ <jsp:forward page="/pages/index.jsf"/>
+</body>
+</html>
\ No newline at end of file
Added: trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/pages/index.jsp
(rev 0)
+++
trunk/sandbox-samples/simpleTogglePanel2-sample/src/main/webapp/pages/index.jsp 2007-04-27
13:24:22 UTC (rev 588)
@@ -0,0 +1,164 @@
+<%@ taglib
uri="http://java.sun.com/jsf/html" prefix="h" %>
+<%@ taglib
uri="http://java.sun.com/jsf/core" prefix="f" %>
+<%@ taglib
uri="http://richfaces.ajax4jsf.org/simpleTogglePanel2"
prefix="stp" %>
+<html>
+<head>
+ <title></title>
+
+ <style type="text/css">
+ .customHeader {
+ color: #000000;
+ background-image: url();
+ background-color: #32CD32;
+ }
+ </style>
+
+</head>
+
+<body>
+<f:view>
+<h:form id="SimpleToglePanel_form">
+
+ <h:selectOneRadio binding="#{skinBean.component}" />
+ <h:commandLink action="#{skinBean.change}" value="set skin"
/>
+ <br/><br/>
+
+ <h:outputText value="Simple richfaces simpleTogglePanel test web
application."
+ style="font: 18px;font-weight: bold;"/>
+ <stp:simpleTogglePanel2 switchType="client" id="panel1"
label="client switchType"
+ width="#{bean.width}" opened="false"
height="#{bean.height}" style="#{bean.style}">
+ <f:facet name="closeMarker">
+ <h:outputText value="Close It" />
+ </f:facet>
+ <f:facet name="openMarker">
+ <h:outputText value="Open It" />
+ </f:facet>
+ <h:panelGrid columns="2" border="1">
+ <h:graphicImage url="/images/Canon.jpg" alt=""/>
+ <h:panelGroup>
+ <h:outputText style="font: 18px;font-weight: bold;"
+ value="Canon EOS Digital Rebel XT"/>
+ <f:verbatim>
+ <br/>
+ 8.2 Megapixels - SLR / Large Digital Camera - 1.8 in LCD Screen -
+ Storage: Compact Flash, Compact Flash Type II - Built In Flash
+ <br/>
+ Achieve the same professional results as film cameras in a flexible,
+ digital format with the Canon EOS Digital Rebel XT. The EOS digital
+ Rebel XT flawlessly combines ease of use with unequalled SLR
performance.
+ This compact digital camera features not only lightweight design and
+ compatibility with over 50 EF lenses, but also an 8.0 megapixel CMOS
+ sensor and DIGIC II image processor. Boasting a 7-point wide area AF
+ system and one battery pack, this compact camera comes with digital
storage
+ media (CF card Type I and II). Take advantage of the 10 second
self-timer
+ delay offered by this Canon camera. Correct the color of any image
with these
+ white balance settings: auto, preset, daylight, shad, cloudy,
twilight, sunset,
+ Tungsten light, White fluorescent light, flash, and custom. With USB
2.0
+ connector and PictBridge printer compatibility, this digital camera
also
+ features a 1,8'' TFT color monitor. Enjoy the ease of use,
affordability,
+ and powerful performance of the Canon EOS Digital Rebel XT.
+ </f:verbatim>
+ </h:panelGroup>
+ </h:panelGrid>
+ </stp:simpleTogglePanel2>
+ <br/><br/>
+
+ <h:panelGrid columns="3" border="1">
+
+ <h:outputText value="Set panel width:" />
+ <h:inputText value="#{bean.width}" size="5"
onchange="submit()"/>
+ <h:commandButton value="Set!"/>
+
+ <h:outputText value="Set panel height:" />
+ <h:inputText value="#{bean.height}" size="5"
onchange="submit()"/>
+ <h:commandButton value="Set!"/>
+
+ <h:outputText value="Set panel style:" />
+ <h:inputText value="#{bean.style}" size="50"
onchange="submit()"/>
+ <h:commandButton value="Set!"/>
+
+ </h:panelGrid>
+
+ <br/><br/>
+ <stp:simpleTogglePanel2 opened="false" switchType="ajax"
id="panel2" label="ajax switchType"
actionListener="#{bean.actionListener}">
+ <h:panelGrid columns="2" border="1">
+ <h:graphicImage url="/images/Nikon.jpg" alt=""/>
+ <h:panelGroup>
+ <h:outputText style="font: 18px;font-weight: bold;"
value="Nikon D70s"/>
+ <f:verbatim>
+ <br/>
+ 6.1 Megapixels - SLR / Large Digital Camera - 2 in LCD Screen -
+ Storage: Compact Flash, Microdrive Compatible, Compact Flash Type II
- Built In
+ Flash
+ <br/>
+ Revolutionize every digital photography experience with the Nikon
D70s digital
+ camera. Designed for amateurs and professionals alike, this Nikon
digital camera
+ features a high resolution of 6.1 megapixels and a large
2.0'' LCD screen.
+ Offering
+ i-TTL speedlight, 5-point autofocus, and lens compatibility with AF
and AF-S
+ Nikkor
+ lenses, this digital SLR camera comes with a rechargeable lithium-ion
battery
+ for
+ continual performance. With seven shooting modes, including auto,
portrait,
+ night
+ portrait, landscape, night landscape, sports, and close-up, this
impressive
+ Nikon
+ digital camera delivers professional quality results with every use.
+ </f:verbatim>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ </stp:simpleTogglePanel2>
+ <br/><br/>
+ <stp:simpleTogglePanel2 opened="false" switchType="server"
id="panel3" label="server switchType"
actionListener="#{bean.actionListener}">
+ <h:panelGrid columns="2" border="1">
+ <h:graphicImage url="/images/Olympus.jpg" alt=""/>
+ <h:panelGroup>
+ <h:outputText style="font: 18px;font-weight: bold;"
value="Olympus EVOLT E-500"/>
+ <f:verbatim>
+ <br/>
+ 8 Megapixels - SLR / Large Digital Camera - 2.5 in LCD Screen -
+ Storage: Compact Flash, xD-Picture Card, Compact Flash Type II -
Built In Flash
+ <br/>
+ Perfect for producing elaborate photography from the professional or
the
+ beginner,
+ this Olympus digital camera packs tons of features into its compact
body.
+ Delivering SLR performance at an affordable price, this digital
camera offers a
+ Dust Reduction System to clean photos of unwanted spots. With 8
megapixel
+ resolution
+ and a TruePic TURBO Image Processor, this Olympus EVOLT definitely
stands out
+ from
+ competing digital cameras. Compatible with different Olympus Zuiko
Digital
+ Specific
+ Lenses, this digital camera boasts a 2.5'' HyperCrystal LCD
screen. For a
+ digital
+ photography experience unmatched by any other camera, bring home this
Olympus
+ EVOLT E-500.
+ </f:verbatim>
+ </h:panelGroup>
+ </h:panelGrid>
+
+ </stp:simpleTogglePanel2>
+ <br/><br/>
+
+ <stp:simpleTogglePanel2 opened="true" switchType="client"
id="p1" label="panel i panel"
headerClass="customHeader">
+ <stp:simpleTogglePanel2 opened="true" switchType="client"
id="p2" label="panel1">
+ <stp:simpleTogglePanel2 opened="true"
switchType="client" id="p3" label="panel2">
+ <h:outputText style="font: 18px;font-weight: bold;"
value="Test"/>
+ </stp:simpleTogglePanel2>
+ </stp:simpleTogglePanel2>
+ </stp:simpleTogglePanel2>
+ <h:commandLink value="apply!"/>
+</h:form>
+ <stp:simpleTogglePanel2 opened="true" switchType="client"
id="p11" label="panel 11 panel"
headerClass="customHeader">
+ <stp:simpleTogglePanel2 opened="true" switchType="client"
id="p22" label="panel1">
+ <h:outputText style="font: 18px;font-weight: bold;"
value="Test"/>
+ <stp:simpleTogglePanel2 opened="true"
switchType="client" id="p3" label="panel2">
+ <h:outputText style="font: 18px;font-weight: bold;"
value="Test"/>
+ </stp:simpleTogglePanel2>
+ </stp:simpleTogglePanel2>
+ </stp:simpleTogglePanel2>
+
+</f:view>
+</body>
+</html>