JBoss Rich Faces SVN: r19545 - in sandbox/trunk/examples/calendar-demo: src and 4 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-10-12 11:44:25 -0400 (Tue, 12 Oct 2010)
New Revision: 19545
Added:
sandbox/trunk/examples/calendar-demo/pom.xml
sandbox/trunk/examples/calendar-demo/src/
sandbox/trunk/examples/calendar-demo/src/main/
sandbox/trunk/examples/calendar-demo/src/main/java/
sandbox/trunk/examples/calendar-demo/src/main/webapp/
sandbox/trunk/examples/calendar-demo/src/main/webapp/META-INF/
sandbox/trunk/examples/calendar-demo/src/main/webapp/META-INF/MANIFEST.MF
sandbox/trunk/examples/calendar-demo/src/main/webapp/WEB-INF/
sandbox/trunk/examples/calendar-demo/src/main/webapp/WEB-INF/web.xml
sandbox/trunk/examples/calendar-demo/src/main/webapp/calendar.xhtml
sandbox/trunk/examples/calendar-demo/src/main/webapp/index.jsp
Modified:
sandbox/trunk/examples/calendar-demo/
Log:
RF-9167
Property changes on: sandbox/trunk/examples/calendar-demo
___________________________________________________________________
Name: svn:ignore
+ .settings
target
.classpath
.project
Added: sandbox/trunk/examples/calendar-demo/pom.xml
===================================================================
--- sandbox/trunk/examples/calendar-demo/pom.xml (rev 0)
+++ sandbox/trunk/examples/calendar-demo/pom.xml 2010-10-12 15:44:25 UTC (rev 19545)
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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/xsd/maven-4.0.0.xsd">
+
+ <parent>
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>richfaces-example-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <relativePath>../parent/pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.richfaces.examples</groupId>
+ <artifactId>calendar-demo</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <name>Richfaces Examples: Calendar</name>
+ <packaging>war</packaging>
+
+ <build>
+ <finalName>${artifactId}-${project.version}</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-beta-1</version>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <profiles>
+ <profile>
+ <id>jee6</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <version>2.1-alpha-1</version>
+ <configuration>
+ <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- JSF impl should be switchable in example specific parent -->
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.sun.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>javax.transaction</groupId>
+ <artifactId>jta</artifactId>
+ <version>1.1</version>
+ <scope>provided</scope>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>release</id>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-war-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>jee6</id>
+ <phase>package</phase>
+ <goals>
+ <goal>war</goal>
+ </goals>
+ <configuration>
+ <webappDirectory>${project.build.directory}/${project.build.finalName}-jee6</webappDirectory>
+ <classifier>jee6</classifier>
+ <packagingExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*</packagingExcludes>
+ <warSourceExcludes>WEB-INF/lib/jsf-api*,WEB-INF/lib/jsf-impl*</warSourceExcludes>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <webResources>
+ <resource>
+ <directory>${basedir}/src/main/java</directory>
+ <targetPath>/WEB-INF/src</targetPath>
+ </resource>
+ </webResources>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.richfaces.ui.calendar</groupId>
+ <artifactId>richfaces-ui-calendar-ui</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.core</groupId>
+ <artifactId>richfaces-ui-core-ui</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.ehcache</groupId>
+ <artifactId>ehcache</artifactId>
+ </dependency>
+
+ <!-- Tests -->
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <version>5.10</version>
+ <classifier>jdk15</classifier>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: sandbox/trunk/examples/calendar-demo/src/main/webapp/META-INF/MANIFEST.MF
===================================================================
--- sandbox/trunk/examples/calendar-demo/src/main/webapp/META-INF/MANIFEST.MF (rev 0)
+++ sandbox/trunk/examples/calendar-demo/src/main/webapp/META-INF/MANIFEST.MF 2010-10-12 15:44:25 UTC (rev 19545)
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
Added: sandbox/trunk/examples/calendar-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- sandbox/trunk/examples/calendar-demo/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ sandbox/trunk/examples/calendar-demo/src/main/webapp/WEB-INF/web.xml 2010-10-12 15:44:25 UTC (rev 19545)
@@ -0,0 +1,108 @@
+<?xml version='1.0' encoding='UTF-8'?>
+
+ <!--
+ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright
+ 1997-2007 Sun Microsystems, Inc. All rights reserved. The contents of
+ this file are subject to the terms of either the GNU General Public
+ License Version 2 only ("GPL") or the Common Development and
+ Distribution License("CDDL") (collectively, the "License"). You may
+ not use this file except in compliance with the License. You can
+ obtain a copy of the License at
+ https://glassfish.dev.java.net/public/CDDL+GPL.html or
+ glassfish/bootstrap/legal/LICENSE.txt. See the License for the
+ specific language governing permissions and limitations under the
+ License. When distributing the software, include this License Header
+ Notice in each file and include the License file at
+ glassfish/bootstrap/legal/LICENSE.txt. Sun designates this particular
+ file as subject to the "Classpath" exception as provided by Sun in the
+ GPL Version 2 section of the License file that accompanied this code.
+ If applicable, add the following below the License Header, with the
+ fields enclosed by brackets [] replaced by your own identifying
+ information: "Portions Copyrighted [year] [name of copyright owner]"
+
+ Contributor(s): If you wish your version of this file to be governed
+ by only the CDDL or only the GPL Version 2, indicate your decision by
+ adding "[Contributor] elects to include this software in this
+ distribution under the [CDDL or GPL Version 2] license." If you don't
+ indicate a single choice of license, a recipient has the option to
+ distribute your version of this file under either the CDDL, the GPL
+ Version 2 or to extend the choice of license to its licensees as
+ provided above. However, if you add GPL Version 2 code and therefore,
+ elected the GPL Version 2 license, then the option applies only if the
+ new code is made subject to such option by the copyright holder.
+ -->
+
+<web-app version="2.5" 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-app_2_5.xsd">
+
+ <display-name></display-name>
+ <description></description>
+ <context-param>
+ <param-name>org.richfaces.skin</param-name>
+ <param-value>#{skinBean.skin}</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>javax.faces.PROJECT_STAGE</param-name>
+ <param-value>Development</param-value>
+ </context-param>
+
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinning</param-name>
+ <param-value>true</param-value>
+ </context-param>
+ <context-param>
+ <param-name>org.richfaces.enableControlSkinningClasses</param-name>
+ <param-value>true</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>javax.faces.DEFAULT_SUFFIX</param-name>
+ <param-value>.xhtml</param-value>
+ </context-param>
+ <context-param>
+ <param-name>facelets.DEVELOPMENT</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <context-param>
+ <description>
+ Set this flag to true if you want the JavaServer Faces
+ Reference Implementation to validate the XML in your
+ faces-config.xml resources against the DTD. Default
+ value is false.
+ </description>
+ <param-name>com.sun.faces.validateXml</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+
+ <!-- Faces Servlet Mapping -->
+ <!--
+
+ This mapping identifies a jsp page as having JSF content. If a request
+ comes to the server for foo.faces, the container will send the request
+ to the FacesServlet, which will expect a corresponding foo.jsp page to
+ exist containing the content.
+ -->
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Added: sandbox/trunk/examples/calendar-demo/src/main/webapp/calendar.xhtml
===================================================================
--- sandbox/trunk/examples/calendar-demo/src/main/webapp/calendar.xhtml (rev 0)
+++ sandbox/trunk/examples/calendar-demo/src/main/webapp/calendar.xhtml 2010-10-12 15:44:25 UTC (rev 19545)
@@ -0,0 +1,45 @@
+<?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:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:calendar="http://richfaces.org/calendar">
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+ <h:head>
+ <title>Richfaces Calendar Demo</title>
+ </h:head>
+ <h:body>
+ <h:form id="form">
+ <h:outputText value="Skin: "/>
+ <h:selectOneMenu value="#{skinBean.skin}" onchange="submit();">
+ <f:selectItems value="#{skinBean.skins}"/>
+ </h:selectOneMenu>
+ <br />
+ <calendar:calendar />
+ </h:form>
+ </h:body>
+</html>
Added: sandbox/trunk/examples/calendar-demo/src/main/webapp/index.jsp
===================================================================
--- sandbox/trunk/examples/calendar-demo/src/main/webapp/index.jsp (rev 0)
+++ sandbox/trunk/examples/calendar-demo/src/main/webapp/index.jsp 2010-10-12 15:44:25 UTC (rev 19545)
@@ -0,0 +1,4 @@
+<html>
+<body>
+ <jsp:forward page="calendar.jsf" /></body>
+</html>
15 years, 7 months
JBoss Rich Faces SVN: r19544 - in sandbox/trunk/ui/calendar/ui: src and 7 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-10-12 11:40:49 -0400 (Tue, 12 Oct 2010)
New Revision: 19544
Added:
sandbox/trunk/ui/calendar/ui/pom.xml
sandbox/trunk/ui/calendar/ui/src/
sandbox/trunk/ui/calendar/ui/src/main/
sandbox/trunk/ui/calendar/ui/src/main/config/
sandbox/trunk/ui/calendar/ui/src/main/config/faces-config.xml
sandbox/trunk/ui/calendar/ui/src/main/java/
sandbox/trunk/ui/calendar/ui/src/main/resources/
sandbox/trunk/ui/calendar/ui/src/main/resources/META-INF/
sandbox/trunk/ui/calendar/ui/src/main/resources/META-INF/resources/
sandbox/trunk/ui/calendar/ui/src/main/resources/META-INF/resources/org.richfaces/
sandbox/trunk/ui/calendar/ui/src/main/resources/META-INF/richfaces/
sandbox/trunk/ui/calendar/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
sandbox/trunk/ui/calendar/ui/src/main/templates/
sandbox/trunk/ui/calendar/ui/src/main/templates/calendar.template.xml
Modified:
sandbox/trunk/ui/calendar/ui/
Log:
RF-9167
Property changes on: sandbox/trunk/ui/calendar/ui
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.classpath
.project
Added: sandbox/trunk/ui/calendar/ui/pom.xml
===================================================================
--- sandbox/trunk/ui/calendar/ui/pom.xml (rev 0)
+++ sandbox/trunk/ui/calendar/ui/pom.xml 2010-10-12 15:40:49 UTC (rev 19544)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, Red Hat,
+ Inc. and individual contributors by the @authors tag. See the
+ copyright.txt in the distribution for a full listing of
+ individual contributors. This is free software; you can
+ redistribute it and/or modify it under the terms of the GNU
+ Lesser General Public License as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your
+ option) any later version. This software 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 software; if not,
+ write to the Free Software Foundation, Inc., 51 Franklin St,
+ Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
+ http://www.fsf.org.
+-->
+
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces.ui</groupId>
+ <artifactId>richfaces-ui-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.richfaces.ui.calendar</groupId>
+ <artifactId>richfaces-ui-calendar-ui</artifactId>
+ <name>Richfaces UI Components: Input UI</name>
+ <packaging>jar</packaging>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.richfaces.cdk</groupId>
+ <artifactId>maven-cdk-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-checkstyle-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <!-- runtime -->
+ <dependency>
+ <groupId>org.richfaces.core</groupId>
+ <artifactId>richfaces-core-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.common</groupId>
+ <artifactId>richfaces-ui-common-ui</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.richfaces.ui.input</groupId>
+ <artifactId>richfaces-ui-input-ui</artifactId>
+ </dependency>
+ </dependencies>
+</project>
Added: sandbox/trunk/ui/calendar/ui/src/main/config/faces-config.xml
===================================================================
--- sandbox/trunk/ui/calendar/ui/src/main/config/faces-config.xml (rev 0)
+++ sandbox/trunk/ui/calendar/ui/src/main/config/faces-config.xml 2010-10-12 15:40:49 UTC (rev 19544)
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<faces-config version="2.0"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd"
+ xmlns="http://java.sun.com/xml/ns/javaee" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/extensions"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <component>
+ <component-type>org.richfaces.Calendar</component-type>
+ <component-class>org.richfaces.component.html.HtmlCalendar</component-class>
+ <component-extension>
+ <cdk:generate>true</cdk:generate>
+ <cdk:base-class>javax.faces.component.UIInput</cdk:base-class>
+ <cdk:component-family>javax.faces.Input</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.CalendarRenderer</cdk:renderer-type>
+ <cdk:tag>
+ <cdk:tag-name>calendar</cdk:tag-name>
+ <cdk:tag-type>Facelets</cdk:tag-type>
+ </cdk:tag>
+ </component-extension>
+ </component>
+ <faces-config-extension>
+ <cdk:taglib>
+ <cdk:shortName>calendar</cdk:shortName>
+ <cdk:uri>http://richfaces.org/calendar</cdk:uri>
+ </cdk:taglib>
+ </faces-config-extension>
+</faces-config>
Added: sandbox/trunk/ui/calendar/ui/src/main/resources/META-INF/richfaces/resource-mappings.properties
===================================================================
Added: sandbox/trunk/ui/calendar/ui/src/main/templates/calendar.template.xml
===================================================================
--- sandbox/trunk/ui/calendar/ui/src/main/templates/calendar.template.xml (rev 0)
+++ sandbox/trunk/ui/calendar/ui/src/main/templates/calendar.template.xml 2010-10-12 15:40:49 UTC (rev 19544)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+JBoss, Home of Professional Open Source
+Copyright ${year}, Red Hat, Inc. and individual contributors
+by the @authors tag. See the copyright.txt in the distribution for a
+full listing of individual contributors.
+
+
+This is free software; you can redistribute it and/or modify it
+under the terms of the GNU Lesser General Public License as
+published by the Free Software Foundation; either version 2.1 of
+the License, or (at your option) any later version.
+
+
+This software 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 software; if not, write to the Free
+Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+02110-1301 USA, or see the FSF site: http://www.fsf.org.
+-->
+<cdk:root xmlns="http://jboss.org/schema/richfaces/cdk/xhtml-el" xmlns:cdk="http://jboss.org/schema/richfaces/cdk/core"
+ xmlns:cc="http://jboss.org/schema/richfaces/cdk/jsf/composite" xmlns:c="http://jboss.org/schema/richfaces/cdk/jstl/core"
+ xmlns:xi="http://www.w3.org/2001/XInclude">
+ <cc:interface>
+ <cdk:class>org.richfaces.renderkit.html.CalendarRenderer</cdk:class>
+ <cdk:superclass>org.richfaces.renderkit.InputRendererBase</cdk:superclass>
+ <cdk:component-family>javax.faces.Input</cdk:component-family>
+ <cdk:renderer-type>org.richfaces.CalendarRenderer</cdk:renderer-type>
+ <cdk:resource-dependency library="org.richfaces" name="base-component.reslib" />
+ <cdk:resource-dependency name="jquery.position.js" />
+ </cc:interface>
+ <cc:implementation>
+ <span id="#{clientId}" class="rf-" >
+ <script type="text/javascript">console.log("calendar")</script>
+ </span>
+ </cc:implementation>
+</cdk:root>
15 years, 7 months
JBoss Rich Faces SVN: r19543 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-10-12 11:40:14 -0400 (Tue, 12 Oct 2010)
New Revision: 19543
Added:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popupList.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/selectList.js
Log:
initial for the RF-9340
Added: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js (rev 0)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popup.js 2010-10-12 15:40:14 UTC (rev 19543)
@@ -0,0 +1,55 @@
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ rf.ui.Popup = function(id, options) {
+ this.id = id;
+ this.popup = $(document.getElementById(id));
+ this.visible = options.visible;
+
+ //TODO: remove this?
+ this.popup.bind("blur", $.proxy(this.__onBlur, this));
+
+ this.popup.bind("mouseover", $.proxy(this.__onMouseOver, this));
+ this.popup.bind("click", $.proxy(this.__onClick, this));
+ };
+
+ rf.BaseComponent.extend(rf.ui.Popup);
+ var $super = rf.ui.Popup.$super;
+
+ $.extend(rf.ui.Popup.prototype, (function () {
+
+ return{
+
+ name : "popup",
+
+ show: function() {
+ this.select.css("display", "");
+ this.visible = true;
+ },
+
+ hide: function() {
+ this.select.css("display", "none");
+ this.visible = false;
+ },
+
+ isVisible: function() {
+ return this.visible;
+ },
+
+ getId: function() {
+ return this.id;
+ },
+
+ __onMouseOver: function(e) {
+ },
+
+ __onClick: function(e) {
+ },
+
+ __onBlurHandler: function(e) {
+ }
+
+ })());
+
+})(jQuery, window.RichFaces);
\ No newline at end of file
Added: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popupList.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popupList.js (rev 0)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/popupList.js 2010-10-12 15:40:14 UTC (rev 19543)
@@ -0,0 +1,114 @@
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ var INTERFACE = {
+ SelectListener : {
+ processItem: function(e, element){}
+ }
+ };
+
+ rf.ui.PopupList = function(id, listener, options) {
+ $super.constructor.call(this, id, options);
+ this.selectListener = listener;
+ this.selectItemCss = options.selectItemCss;
+ this.itemCss = options.itemCss;
+
+ //TODO: from option map?
+ this.index = -1;
+ this.visible = false;
+ this.__updateItemsList();
+ };
+
+ rf.ui.Popup.extend(rf.ui.PopupList);
+ var $super = rf.ui.PopupList.$super;
+
+ $.extend(rf.ui.PopupList.prototype, ( function () {
+
+ var isSelectListener = function(obj) {
+ for (var method in INTERFACE.SelectListener) {
+ if ( (typeof obj[method] != typeof INTERFACE.SelectListener[method]) ) {
+ return false;
+ }
+ }
+ return true;
+ };
+
+ return{
+
+ name : "popupList",
+
+ processItem: function(e, element) {
+ if(isSelectListener(this.selectListener)) {
+ this.selectListener.processItem(e, element);
+ }
+ },
+
+ __updateItemsList: function () {
+ this.items = this.popup.find("."+this.itemCss);
+ },
+
+ __select: function(index) {
+ var item;
+
+ if (this.index != -1) {
+ item = this.items.eq(this.index);
+ this.__unSelectItem(item);
+ }
+
+ this.index += index;
+ if (this.index < 0 ) {
+ this.index = this.items.length - 1;
+ } else if (this.index >= this.items.length) {
+ this.index = 0;
+ }
+
+ item = this.items.eq(this.index);
+ this.__selectItem(item);
+ },
+
+ __selectItem: function(item) {
+ item.addClass(this.selectItemCss);
+ },
+
+ __unSelectItem: function(item) {
+ item.removeClass(this.selectItemCss);
+ },
+
+ __onEnter: function(e) {
+ },
+
+ //remove event, rename
+ __onKeyUp: function(e) {
+ this.__select(-1);
+ },
+
+ //remove event, rename
+ __onKeyDown: function(e) {
+ this.__select(1);
+ },
+
+ __onMouseOver: function(e) {
+ var item = this.__getItem(e);
+ var index = this.items.index(item);
+ this.__select(index);
+ },
+
+ __onClick: function(e) {
+ var item = this.__getItem(e);
+ var index = this.items.index(item);
+ this.__select(index);
+ this.processItem(e, item);
+ },
+
+ __getItem: function(e) {
+ return $(e.target).closest("."+this.itemCss, e.currentTarget);
+ },
+
+ __getItems: function () {
+ return this.items;
+ }
+ }
+ })());
+
+})(jQuery, window.RichFaces);
\ No newline at end of file
Added: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/selectList.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/selectList.js (rev 0)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/selectList.js 2010-10-12 15:40:14 UTC (rev 19543)
@@ -0,0 +1,20 @@
+(function ($, rf) {
+
+ rf.ui = rf.ui || {};
+
+ rf.ui.SelectList = function(id, listener, options) {
+ $super.constructor.call(this, id, options);
+ };
+
+ rf.ui.PopupList.extend(rf.ui.SelectList);
+ var $super = rf.ui.SelectList.$super;
+
+ $.extend(rf.ui.SelectList.prototype,(function () {
+
+ return{
+ name : "selectList",
+ }
+
+ })());
+
+})(jQuery, window.RichFaces);
\ No newline at end of file
15 years, 7 months
JBoss Rich Faces SVN: r19542 - trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2010-10-12 11:37:45 -0400 (Tue, 12 Oct 2010)
New Revision: 19542
Modified:
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
Log:
keyboard keys proccess
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-10-12 15:35:33 UTC (rev 19541)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceBase.js 2010-10-12 15:37:45 UTC (rev 19542)
@@ -1,4 +1,22 @@
// TODO: remove when these functions will be moved to the RichFaces.Event <!--
+
+(function (rf) {
+ rf.KEYS = {
+ BACKSPACE: 8,
+ TAB: 9,
+ RETURN: 13,
+ ESC: 27,
+ PAGEUP: 33,
+ PAGEDOWN: 34,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ DEL: 46
+ };
+})(RichFaces);
+
+
$.extend(RichFaces.Event, {
bindScrollEventHandlers: function(element, handler, component) {
var elements = [];
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2010-10-12 15:35:33 UTC (rev 19541)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceInput.js 2010-10-12 15:37:45 UTC (rev 19542)
@@ -47,7 +47,15 @@
},
__keydownHandler: function(e) {
- switch(e.keyCode) {
+ var code;
+
+ if(e.keyCode) {
+ code = e.keyCode;
+ } else if(e.which) {
+ code = e.which;
+ }
+
+ switch(code) {
case 27:
this.cancel();
break;
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-10-12 15:35:33 UTC (rev 19541)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/inplaceSelect.js 2010-10-12 15:37:45 UTC (rev 19542)
@@ -79,6 +79,30 @@
}
}
},
+
+ __keydownHandler: function(e) {
+ $super.__keydownHandler(e);
+
+ var code;
+
+ if(e.keyCode) {
+ code = e.keyCode;
+ } else if(e.which) {
+ code = e.which;
+ }
+
+ switch(code) {
+ case rf.KEYS.DOWN:
+ e.preventDefault();
+ this.select.__onKeyDown(e);
+ break;
+
+ case rf.KEYS.UP:
+ e.preventDefault();
+ this.select.__onKeyUp(e);
+ break;
+ }
+ },
__blurHandler: function(e) {
var target = $(e.originalEvent.explicitOriginalTarget);
Modified: trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js
===================================================================
--- trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2010-10-12 15:35:33 UTC (rev 19541)
+++ trunk/ui/input/ui/src/main/resources/META-INF/resources/org.richfaces/select.js 2010-10-12 15:37:45 UTC (rev 19542)
@@ -1,3 +1,20 @@
+//TODO: utils?
+(function (rf) {
+ rf.KEYS = {
+ BACKSPACE: 8,
+ TAB: 9,
+ RETURN: 13,
+ ESC: 27,
+ PAGEUP: 33,
+ PAGEDOWN: 34,
+ LEFT: 37,
+ UP: 38,
+ RIGHT: 39,
+ DOWN: 40,
+ DEL: 46
+ };
+})(RichFaces);
+
(function ($, rf) {
rf.ui = rf.ui || {};
@@ -4,7 +21,7 @@
var INTERFACE = {
SelectListener : {
- processItem: function(event, element){}
+ processItem: function(e, element){}
}
};
@@ -19,6 +36,11 @@
this.select.bind("blur", $.proxy(this.__blurHandler, this));
this.itemsCord.bind("mouseover", $.proxy(this.__mouseHandler, this));
this.itemsCord.bind("click", $.proxy(this.__mouseHandler, this));
+
+ this.index = -1;
+ //TODO: from option map?
+ this.visible = false;
+ this.updateItemsList();
};
rf.BaseComponent.extend(rf.ui.Select);
@@ -42,18 +64,55 @@
show: function() {
this.select.css("display", "");
+ this.visible = true;
},
hide: function() {
this.select.css("display", "none");
+ this.visible = false;
},
- processItem: function(event, element) {
+ processItem: function(e, element) {
if(isSelectListener(this.selectListener)) {
- this.selectListener.processItem(event, element);
+ this.selectListener.processItem(e, element);
}
},
+ isVisible: function() {
+ return this.visible;
+ },
+
+ __selectItem: function(e, index) {
+ var item;
+
+ if (this.index != -1) {
+ item = this.items.eq(this.index);
+ item.removeClass(this.selectItemCss);
+ }
+
+ this.index += index;
+ if ( this.index < 0 ) {
+ this.index = this.items.length - 1;
+ } else if (this.index >= this.items.length) {
+ this.index = 0;
+ }
+
+ item = this.items.eq(this.index);
+ item.addClass(this.selectItemCss);
+ },
+
+ __onEnter: function(e) {
+
+ },
+
+ __onKeyUp: function(e) {
+ this.__selectItem(e, -1);
+ },
+
+ __onKeyDown: function(e) {
+ this.__selectItem(e, 1);
+ },
+
__getCurrentElement: function() {
return processed;
},
@@ -63,10 +122,10 @@
return false;
},
- __mouseHandler: function(event) {
- var element = $(event.target).closest("."+this.itemCss, event.currentTarget);
- if (event&& element) {
- if(event.type == 'mouseover') {
+ __mouseHandler: function(e) {
+ var element = $(e.target).closest("."+this.itemCss, e.currentTarget);
+ if (e && element) {
+ if(e.type == 'mouseover') {
if(processed) {
processed.removeClass(this.selectItemCss);
}
@@ -74,13 +133,21 @@
processed = element;
}
- if(event.type == 'click') {
- this.processItem(event, element);
+ if(e.type == 'click') {
+ this.processItem(e, element);
}
}
return false;
- },
+ },
+ updateItemsList: function () {
+ this.items = this.itemsCord.find("."+this.itemCss);
+ },
+
+ __getItems: function () {
+ return this.items;
+ },
+
__getId: function() {
return this.id;
}
15 years, 7 months
JBoss Rich Faces SVN: r19540 - sandbox/trunk/ui/calendar.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2010-10-12 11:34:29 -0400 (Tue, 12 Oct 2010)
New Revision: 19540
Added:
sandbox/trunk/ui/calendar/pom.xml
sandbox/trunk/ui/calendar/ui/
Log:
RF-9167
Added: sandbox/trunk/ui/calendar/pom.xml
===================================================================
--- sandbox/trunk/ui/calendar/pom.xml (rev 0)
+++ sandbox/trunk/ui/calendar/pom.xml 2010-10-12 15:34:29 UTC (rev 19540)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss, Home of Professional Open Source Copyright 2010, Red Hat,
+ Inc. and individual contributors by the @authors tag. See the
+ copyright.txt in the distribution for a full listing of
+ individual contributors. This is free software; you can
+ redistribute it and/or modify it under the terms of the GNU
+ Lesser General Public License as published by the Free Software
+ Foundation; either version 2.1 of the License, or (at your
+ option) any later version. This software 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 software; if not,
+ write to the Free Software Foundation, Inc., 51 Franklin St,
+ Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site:
+ http://www.fsf.org.
+-->
+
+<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/xsd/maven-4.0.0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.richfaces</groupId>
+ <artifactId>richfaces-root-parent</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </parent>
+
+ <groupId>org.richfaces.ui.calendar</groupId>
+ <artifactId>richfaces-ui-calendar-aggregator</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <name>Richfaces UI Components: Calendar Aggregator</name>
+
+ <modules>
+ <module>ui</module>
+ </modules>
+</project>
15 years, 7 months
JBoss Rich Faces SVN: r19539 - modules/tests/metamer/trunk/application/src/main/webapp/templates.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-10-12 09:23:00 -0400 (Tue, 12 Oct 2010)
New Revision: 19539
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
Log:
* added alt attribute to images so that Myfaces doesn't show warnings
Modified: modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2010-10-12 13:19:31 UTC (rev 19538)
+++ modules/tests/metamer/trunk/application/src/main/webapp/templates/header.xhtml 2010-10-12 13:23:00 UTC (rev 19539)
@@ -32,14 +32,14 @@
<h:form id="controlsForm">
<h:panelGrid columns="3">
<h:link id="goHomeLink" outcome="/index">
- <h:graphicImage id="goHomeImage" library="images" name="home.png" title="Go Home" style="width: 36px;" />
+ <h:graphicImage id="goHomeImage" library="images" name="home.png" title="Go Home" style="width: 36px;" alt="Go Home" />
</h:link>
<h:link id="goToListLink" outcome="list">
<h:graphicImage id="goToListImage" library="images" name="back.png" title="Go to List of Pages"
- style="width: 36px;" />
+ style="width: 36px;" alt="Go to List of Pages"/>
</h:link>
<h:graphicImage id="reRenderAllImage" library="images" name="refresh.png" title="Rerender All"
- style="width: 36px;">
+ style="width: 36px;" alt="Rerender All">
<a4j:ajax event="click" render="commonGrid" />
</h:graphicImage>
</h:panelGrid>
15 years, 7 months
JBoss Rich Faces SVN: r19538 - modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-10-12 09:19:31 -0400 (Tue, 12 Oct 2010)
New Revision: 19538
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml
Log:
* added for attribute to outputLabel so that Myfaces doesn't show warnings
Modified: modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml 2010-10-12 12:50:47 UTC (rev 19537)
+++ modules/tests/metamer/trunk/application/src/main/webapp/resources/metamer/attributes.xhtml 2010-10-12 13:19:31 UTC (rev 19538)
@@ -23,7 +23,7 @@
columnClasses="attributes-first-column, attributes-second-column, attributes-first-column, attributes-second-column">
<c:forEach items="#{cc.attrs.value}" var="entry">
<h:panelGroup layout="block">
- <h:outputLabel id="#{entry.key}Label" value="#{entry.key}" style="margin-right: 5px;" />
+ <h:outputLabel id="#{entry.key}Label" value="#{entry.key}" style="margin-right: 5px;" for="#{entry.key}Input"/>
<h:graphicImage value="/resources/images/help.png" title="#{entry.value.help}"
rendered="#{entry.value.help != null}" height="28px;"
style="vertical-align: middle;" styleClass="attribute-help" >
15 years, 7 months
JBoss Rich Faces SVN: r19537 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/bean and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-10-12 08:50:47 -0400 (Tue, 12 Oct 2010)
New Revision: 19537
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml
Log:
* class Attributes fixed to work for Mojarra and Myfaces implementation of Facelets
* page with ui:repeat fixed to work with Myfaces
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-10-12 09:30:07 UTC (rev 19536)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/Attributes.java 2010-10-12 12:50:47 UTC (rev 19537)
@@ -63,7 +63,7 @@
public final class Attributes implements Map<String, Attribute>, Serializable {
private static final long serialVersionUID = -1L;
- private Logger logger;
+ private static Logger logger = LoggerFactory.getLogger(Attributes.class);
// K - name of a component attribute, V - value of the component attribute
private Map<String, Attribute> attributes;
// class object of managed bean
@@ -78,7 +78,6 @@
* class object of a managed bean
*/
private Attributes(Class<?> componentClass, Class<?> beanClass) {
- logger = LoggerFactory.getLogger(Attributes.class);
logger.debug("creating attributes map for " + componentClass);
this.beanClass = beanClass;
@@ -113,7 +112,7 @@
}
/**
- * Constructor for class Attributes.
+ * Factory method for creating instances of class Attributes.
*
* @param componentClass
* class object of a JSF component whose attributes will be stored
@@ -125,7 +124,7 @@
}
/**
- * Constructor for class Attributes.
+ * Factory method for creating instances of class Attributes.
*
* @param behaviorClass
* class object of a JSF behavior whose attributes will be stored
@@ -137,6 +136,34 @@
}
/**
+ * Factory method for creating instances of class Attributes.
+ *
+ * @param behaviorClass
+ * class object of a JSF behavior whose attributes will be stored
+ * @param beanClass
+ * class object of a managed bean
+ */
+ public static Attributes getFaceletsComponentAttributes(String componentClass, Class<?> beanClass) {
+ Class<?> faceletsClass = null;
+
+ try {
+ faceletsClass = Class.forName(componentClass);
+ } catch (ClassNotFoundException cnfe1) {
+ try {
+ if (componentClass.startsWith("com.sun.faces.facelets")) {
+ faceletsClass = Class.forName(componentClass.replace("com.sun.faces.facelets", "org.apache.myfaces.view.facelets"));
+ } else {
+ faceletsClass = Class.forName(componentClass.replace("org.apache.myfaces.view.facelets", "com.sun.faces.facelets"));
+ }
+ } catch (ClassNotFoundException cnfe2) {
+ logger.error(cnfe2.getMessage());
+ }
+ }
+
+ return new Attributes(faceletsClass, beanClass);
+ }
+
+ /**
* Loads help strings from property file.
*/
private void loadHelp() {
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java 2010-10-12 09:30:07 UTC (rev 19536)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/UiRepeatBean.java 2010-10-12 12:50:47 UTC (rev 19537)
@@ -70,7 +70,7 @@
}
// initialize attributes
- attributes = Attributes.getUIComponentAttributes(com.sun.faces.facelets.component.UIRepeat.class, getClass());
+ attributes = Attributes.getFaceletsComponentAttributes("org.apache.myfaces.view.facelets.component.UIRepeat", getClass());
attributes.setAttribute("rendered", true);
attributes.setAttribute("step", 1);
attributes.setAttribute("end", 20);
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml 2010-10-12 09:30:07 UTC (rev 19536)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/uiRepeat/simple.xhtml 2010-10-12 12:50:47 UTC (rev 19537)
@@ -63,12 +63,17 @@
<f:setPropertyActionListener target="#{uiRepeatBean.selectedDataItem}" value="#{item}" />
</h:commandLink>
+
+ <!-- http://myfaces.apache.org/core20/myfaces-impl/apidocs/org/apache/myfaces/... -->
<a4j:outputPanel id="statusPanel" styleClass="statuses">
<h:outputText id="statusIndex" value="index=#{status.index}, "/>
- <h:outputText id="statusCount" value="count=#{status.count}, "/>
<h:outputText id="statusFirst" value="first=#{status.first}, "/>
<h:outputText id="statusLast" value="last=#{status.last}, "/>
<h:outputText id="statusEven" value="even=#{status.even}, "/>
+ <h:outputText id="statusOdd" value="odd=#{status.odd}, "/>
+ <h:outputText id="statusStep" value="step=#{status.step}, "/>
+ <h:outputText id="statusBegin" value="begin=#{status.begin}, "/>
+ <h:outputText id="statusEnd" value="end=#{status.end}, "/>
</a4j:outputPanel>
</li>
</ui:repeat>
15 years, 7 months
JBoss Rich Faces SVN: r19536 - in modules/tests/metamer/trunk/application/src/main: webapp/components/richDataTable and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: ppitonak(a)redhat.com
Date: 2010-10-12 05:30:07 -0400 (Tue, 12 Oct 2010)
New Revision: 19536
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml
Log:
* filtering in rich:dataTable fixed
Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java
===================================================================
--- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2010-10-12 01:33:06 UTC (rev 19535)
+++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichDataTableBean.java 2010-10-12 09:30:07 UTC (rev 19536)
@@ -58,15 +58,15 @@
private int page = 1;
// true = model, false = empty table
private boolean state = true;
-
// sorting
private SortOrder capitalsOrder = SortOrder.unsorted;
private SortOrder statesOrder = SortOrder.unsorted;
-
// filtering
private String sexFilter;
private String nameFilter;
private String titleFilter;
+ private int kidsFilter;
+ private int kidsFilter2;
/**
* Initializes the managed bean.
@@ -179,6 +179,22 @@
this.titleFilter = titleFilter;
}
+ public int getKidsFilter() {
+ return kidsFilter;
+ }
+
+ public void setKidsFilter(int kidsFilter) {
+ this.kidsFilter = kidsFilter;
+ }
+
+ public int getKidsFilter2() {
+ return kidsFilter2;
+ }
+
+ public void setKidsFilter2(int kidsFilter2) {
+ this.kidsFilter2 = kidsFilter2;
+ }
+
public void sortByCapitals() {
statesOrder = SortOrder.unsorted;
if (capitalsOrder.equals(SortOrder.ascending)) {
@@ -196,7 +212,7 @@
setStatesOrder(SortOrder.ascending);
}
}
-
+
public Filter<?> getFilterSexImpl() {
return new Filter<Employee>() {
@@ -210,6 +226,19 @@
};
}
+ public Filter<?> getFilterKidsImpl() {
+ return new Filter<Employee>() {
+
+ public boolean accept(Employee e) {
+ int kids = getKidsFilter();
+ if (e.getNumberOfKids() >= kids) {
+ return true;
+ }
+ return false;
+ }
+ };
+ }
+
public void sortingListener(SortingEvent event) {
System.out.println(event.getSortOrder());
}
Modified: modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml
===================================================================
--- modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml 2010-10-12 01:33:06 UTC (rev 19535)
+++ modules/tests/metamer/trunk/application/src/main/webapp/components/richDataTable/filtering.xhtml 2010-10-12 09:30:07 UTC (rev 19536)
@@ -135,13 +135,15 @@
</f:facet>
</rich:column>
- <rich:column id="columnNumberOfKids">
+ <rich:column id="columnNumberOfKids" filter="#{richDataTableBean.filterKidsImpl}">
<f:facet name="header">
<h:outputText id="columnHeaderNumberOfKids" value="Number of Kids" />
<br/>
<h:outputText id="columnHeaderNumberOfKidsType" value="(expression >=)" />
<br/>
- <h:inputText id="columnHeaderNumberOfKidsInput" value="TODO inputNumberSpinner"/>
+ <rich:inputNumberSpinner id="columnHeaderNumberOfKidsInput" value="#{richDataTableBean.kidsFilter}" minValue="0" maxValue="5" cycled="true">
+ <a4j:ajax render="commonGrid" execute="@this"/>
+ </rich:inputNumberSpinner>
</f:facet>
<h:outputText value="#{record.numberOfKids}" />
@@ -156,7 +158,9 @@
<br/>
<h:outputText id="columnHeaderNumberOfKids2Type" value="(expression <)" />
<br/>
- <h:inputText id="columnHeaderNumberOfKids2Input" value="TODO inputNumberSlider"/>
+ <rich:inputNumberSlider id="columnHeaderNumberOfKids2Input" value="#{richDataTableBean.kidsFilter2}" minValue="0" maxValue="5" showInput="false">
+ <a4j:ajax render="commonGrid" execute="@this"/>
+ </rich:inputNumberSlider>
</f:facet>
<h:outputText value="#{record.numberOfKids}" />
15 years, 7 months