Author: A.Skokov
Date: 2007-03-26 09:16:33 -0400 (Mon, 26 Mar 2007)
New Revision: 154
Added:
trunk/richfaces-samples/dropdownmenu-sample/
trunk/richfaces-samples/dropdownmenu-sample/pom.xml
trunk/richfaces-samples/dropdownmenu-sample/src/
trunk/richfaces-samples/dropdownmenu-sample/src/main/
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/Bean.java
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/faces-config.xml
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/web.xml
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/index.jsp
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
Log:
Added: trunk/richfaces-samples/dropdownmenu-sample/pom.xml
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/pom.xml (rev 0)
+++ trunk/richfaces-samples/dropdownmenu-sample/pom.xml 2007-03-26 13:16:33 UTC (rev 154)
@@ -0,0 +1,35 @@
+<?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>dropdownmenu-sample</artifactId>
+ <packaging>war</packaging>
+ <name>webapp Maven Webapp</name>
+ <build>
+ <finalName>dropdownmenu-sample</finalName>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>dropdown-menu</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces</groupId>
+ <artifactId>menu-components</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/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/Bean.java
===================================================================
---
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/Bean.java
(rev 0)
+++
trunk/richfaces-samples/dropdownmenu-sample/src/main/java/org/richfaces/samples/dropdownmenu/Bean.java 2007-03-26
13:16:33 UTC (rev 154)
@@ -0,0 +1,38 @@
+/**
+ * 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.samples.dropdownmenu;
+
+/**
+ * @author $Autor$
+ */
+public class Bean {
+
+ private String width = "300px";
+
+ public String getWidth() {
+ return width;
+ }
+
+ public void setWidth(String width) {
+ this.width = width;
+ }
+}
\ No newline at end of file
Added:
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/faces-config.xml
(rev 0)
+++
trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/faces-config.xml 2007-03-26
13:16:33 UTC (rev 154)
@@ -0,0 +1,15 @@
+<?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.samples.dropdownmenu.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>
+</faces-config>
Added: trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/web.xml
(rev 0)
+++ trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/WEB-INF/web.xml 2007-03-26
13:16:33 UTC (rev 154)
@@ -0,0 +1,50 @@
+<?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>org.ajax4jsf.SKIN</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+ <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.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/richfaces-samples/dropdownmenu-sample/src/main/webapp/index.jsp
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/index.jsp
(rev 0)
+++ trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/index.jsp 2007-03-26
13:16:33 UTC (rev 154)
@@ -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/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp
(rev 0)
+++ trunk/richfaces-samples/dropdownmenu-sample/src/main/webapp/pages/index.jsp 2007-03-26
13:16:33 UTC (rev 154)
@@ -0,0 +1,47 @@
+<%@ 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/dropdown-menu"
prefix="ddm" %>
+<%@ taglib
uri="http://richfaces.ajax4jsf.org/menu-components"
prefix="mc" %>
+<html>
+
+<head>
+ <style type="text/css">
+ </style>
+</head>
+
+<body>
+<f:view>
+ <h:form>
+ <h:messages style="color:red"/>
+ <h:selectOneRadio binding="#{skinBean.component}"/>
+ <h:commandLink action="#{skinBean.change}" value="set
skin"/>
+
+ <ddm:dropDownMenu id="dropDownMenu"
popupWidth="#{bean.width}" value="Label">
+ <mc:menuItem id="menuItem11" value="Active1"/>
+ <mc:menuItem id="menuItem12" value="Active1"/>
+ <mc:menuItem id="menuItem13" value="Active1"/>
+ <mc:menuItem id="menuItem14" value="Active1"/>
+
+ <mc:menuSeparator id="menuSeparator1"/>
+
+ <mc:menuItem id="menuItem15" value="Disable"
disabled="true"/>
+ <mc:menuItem id="menuItem16" value="Active1"/>
+ </ddm:dropDownMenu>
+
+ <br/>
+ <br/>
+
+ <h:panelGroup>
+ <h:outputText value="Width:"/>
+ <h:selectOneRadio value="#{bean.width}"
onclick="submit()">
+ <f:selectItem itemLabel="auto"
itemValue="auto"/>
+ <f:selectItem itemLabel="200"
itemValue="200px"/>
+ <f:selectItem itemLabel="300"
itemValue="300px"/>
+ <f:selectItem itemLabel="400"
itemValue="400px"/>
+ </h:selectOneRadio>
+ </h:panelGroup>
+
+ </h:form>
+</f:view>
+</body>
+</html>