You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-commits@incubator.apache.org by ma...@apache.org on 2007/03/29 07:51:08 UTC
svn commit: r523607 [2/14] - in /incubator/adffaces/trunk/trinidad:
trinidad-assembly/ trinidad-assembly/src/ trinidad-assembly/src/main/
trinidad-assembly/src/main/assembly/ trinidad-assembly/src/main/resources/
trinidad-examples/ trinidad-examples/bl...
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/blank/pom.xml?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/blank/pom.xml (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/blank/pom.xml Thu Mar 29 00:50:53 2007
@@ -0,0 +1,149 @@
+<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">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+ <parent>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad</artifactId>
+ <version>1.0.0-incubating</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Apache Trinidad blank demo</name>
+ <description>Apache Trinidad blank demo</description>
+
+ <artifactId>trinidad-blank</artifactId>
+ <packaging>war</packaging>
+
+
+ <!-- Profile to run jetty, so the tomcat jars are included in the bundle. They are not included by default -->
+ <profiles>
+ <profile>
+ <id>jettyConfig</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.0</version>
+ <configuration>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8181</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ <scanIntervalSeconds>2</scanIntervalSeconds>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler</artifactId>
+ <version>5.5.9</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-runtime</artifactId>
+ <version>5.5.9</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler-jdt</artifactId>
+ <version>5.5.9</version>
+ <scope>compile</scope>
+ </dependency>
+ </dependencies>
+
+ <pluginRepositories>
+ <!-- Repository to get the jetty plugin -->
+ <pluginRepository>
+ <id>mortbay-repo</id>
+ <name>mortbay-repo</name>
+ <url>http://www.mortbay.org/maven2/snapshot</url>
+ </pluginRepository>
+ </pluginRepositories>
+
+ </profile>
+ </profiles>
+
+ <repositories>
+ <repository>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <id>apache-maven-snapshots</id>
+ <url>http://people.apache.org/repo/m2-snapshot-repository/</url>
+ </repository>
+ </repositories>
+
+ <!-- Project dependencies -->
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <version>1.1.5</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <version>1.1.5</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <!-- Apache Trinidad -->
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-api</artifactId>
+ <version>1.0.0-incubating</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad-impl</artifactId>
+ <version>1.0.0-incubating</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.0</version>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+</project>
\ No newline at end of file
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,67 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidad.blank;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
+import org.apache.myfaces.trinidad.util.Service;
+
+/**
+ * A typical simple backing bean, that is backed to <code>helloworld.jsp</code>
+ *
+ */
+public class HelloWorldBacking
+{
+
+ //properties
+ private String _name;
+
+ /**
+ * default empty constructor
+ */
+ public HelloWorldBacking()
+ {
+ }
+
+ //-------------------getter & setter
+ public String getName()
+ {
+ return _name;
+ }
+
+ public void setName(String name)
+ {
+ this._name = name;
+ }
+
+ /**
+ * Method that is backed to a submit button of a form.
+ */
+ public String send()
+ {
+ FacesContext facesContext = FacesContext.getCurrentInstance();
+ ExtendedRenderKitService service = (ExtendedRenderKitService)
+ Service.getRenderKitService(facesContext, ExtendedRenderKitService.class);
+ service.addScript(facesContext, "alert('Script added by ExtendedRenderKitService')");
+
+ //do real logic
+ return ("success");
+ }
+}
\ No newline at end of file
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/java/org/apache/myfaces/trinidad/blank/HelloWorldBacking.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/faces-config.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/faces-config.xml?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/faces-config.xml (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/faces-config.xml Thu Mar 29 00:50:53 2007
@@ -0,0 +1,62 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<!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>
+
+ <application>
+ <!-- Use the Trinidad RenderKit -->
+ <default-render-kit-id>
+ org.apache.myfaces.trinidad.core
+ </default-render-kit-id>
+ </application>
+
+ <!-- Global preferences object that proxies to others -->
+ <managed-bean>
+ <managed-bean-name>helloWorldBacking</managed-bean-name>
+ <managed-bean-class>
+ org.apache.myfaces.trinidad.blank.HelloWorldBacking
+ </managed-bean-class>
+ <managed-bean-scope>
+ request
+ </managed-bean-scope>
+ </managed-bean>
+
+ <!-- navigation rules for index.jspx -->
+ <navigation-rule>
+ <from-view-id>/index.jspx</from-view-id>
+ <navigation-case>
+ <from-outcome>success</from-outcome>
+ <to-view-id>/page2.jspx</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+ <!-- navigation rules for page2.jspx -->
+ <navigation-rule>
+ <from-view-id>/page2.jspx</from-view-id>
+ <navigation-case>
+ <from-outcome>back</from-outcome>
+ <to-view-id>/index.jspx</to-view-id>
+ </navigation-case>
+ </navigation-rule>
+
+</faces-config>
\ No newline at end of file
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/faces-config.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/web.xml?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/web.xml (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/web.xml Thu Mar 29 00:50:53 2007
@@ -0,0 +1,118 @@
+<?xml version = '1.0' encoding = 'ISO-8859-1'?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<web-app 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"
+ version="2.4">
+ <!-- Use client-side state saving. In Trinidad, it is an
+ optimized, token-based mechanism that is almost always a
+ better choice than the standard JSF server-side state saving. -->
+ <context-param>
+ <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
+ <param-value>client</param-value>
+ <!--param-value>server</param-value-->
+ </context-param>
+
+ <!-- Trinidad by default uses an optimized client-side state saving
+ mechanism. To disable that, uncomment the following -->
+ <!--context-param>
+ <param-name>org.apache.myfaces.trinidad.CLIENT_STATE_METHOD</param-name>
+ <param-value>all</param-value>
+ </context-param-->
+
+ <!-- Trinidad also supports an optimized strategy for caching some
+ view state at an application level, which significantly improves
+ scalability. However, it makes it harder to develop (updates to
+ pages will not be noticed until the server is restarted), and in
+ some rare cases cannot be used for some pages (see Trinidad
+ documentation for more information) -->
+ <context-param>
+ <param-name>org.apache.myfaces.trinidad.USE_APPLICATION_VIEW_CACHE</param-name>
+ <param-value>false</param-value>
+ </context-param>
+
+ <!-- If this parameter is enabled, Trinidad will automatically
+ check the modification date of your JSPs, and discard saved
+ state when they change; this makes development easier,
+ but adds overhead that should be avoided when your application
+ is deployed -->
+ <context-param>
+ <param-name>org.apache.myfaces.trinidad.CHECK_FILE_MODIFICATION</param-name>
+ <param-value>true</param-value>
+ </context-param>
+
+ <!-- Enables Change Persistence at a session scope. By default,
+ Change Persistence is entirely disabled. The ChangeManager is
+ an API, which can persist component modifications (like,
+ is a showDetail or tree expanded or collapsed). For providing
+ a custom Change Persistence implementation inherit from the
+ Trinidad API's ChangeManager class. As the value you have
+ to use the fullqualified class name. -->
+ <context-param>
+ <param-name>org.apache.myfaces.trinidad.CHANGE_PERSISTENCE</param-name>
+ <param-value>session</param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>trinidad</filter-name>
+ <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>
+ </filter>
+
+ <filter-mapping>
+ <filter-name>trinidad</filter-name>
+ <servlet-name>faces</servlet-name>
+ </filter-mapping>
+
+ <!-- Listener, to allow Jetty serving MyFaces apps -->
+ <listener>
+ <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ </listener>
+
+ <!-- Faces Servlet -->
+ <servlet>
+ <servlet-name>faces</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ </servlet>
+
+ <!-- resource loader servlet -->
+ <servlet>
+ <servlet-name>resources</servlet-name>
+ <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>
+ </servlet>
+
+ <!-- Faces Servlet Mappings -->
+ <servlet-mapping>
+ <servlet-name>faces</servlet-name>
+ <url-pattern>/faces/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>resources</servlet-name>
+ <url-pattern>/adf/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!-- Welcome Files -->
+ <welcome-file-list>
+ <welcome-file>index.jspx</welcome-file>
+ </welcome-file-list>
+
+</web-app>
\ No newline at end of file
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/index.jspx
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/index.jspx?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/index.jspx (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/index.jspx Thu Mar 29 00:50:53 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad" >
+ <jsp:directive.page contentType="text/html;charset=utf-8"/>
+ <f:view>
+ <tr:document title="Apache Trinidad Blank Demo">
+ <tr:form>
+
+ <tr:panelPage>
+ <tr:inputText label="Your name" id="input1" value="#{helloWorldBacking.name}" required="true"/>
+ <tr:commandButton id="button1" text="press me" action="#{helloWorldBacking.send}" />
+ </tr:panelPage>
+
+ </tr:form>
+ </tr:document>
+ </f:view>
+</jsp:root>
\ No newline at end of file
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/page2.jspx
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/page2.jspx?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/page2.jspx (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/blank/src/main/webapp/page2.jspx Thu Mar 29 00:50:53 2007
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="iso-8859-1" standalone="yes" ?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+<jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.0"
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:tr="http://myfaces.apache.org/trinidad" >
+ <jsp:directive.page contentType="text/html;charset=utf-8"/>
+ <f:view>
+ <tr:document title="Apache Trinidad Blank Demo">
+ <tr:form>
+
+ <tr:panelPage>
+ <tr:outputText id="input1" value="Hello #{helloWorldBacking.name}. We hope you enjoy Apache MyFaces Trinidad"/>
+ <tr:commandLink id="link" text="GO HOME" action="back" />
+ </tr:panelPage>
+
+ </tr:form>
+ </tr:document>
+ </f:view>
+</jsp:root>
\ No newline at end of file
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/pom.xml?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/pom.xml (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/pom.xml Thu Mar 29 00:50:53 2007
@@ -0,0 +1,132 @@
+<?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/maven-v4_0_0.xsd">
+<!--
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+-->
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad</artifactId>
+ <version>1.0.0-incubating</version>
+ </parent>
+ <packaging>pom</packaging>
+ <name>Apache Trinidad Examples</name>
+ <artifactId>trinidad-example</artifactId>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/adffaces/tags/trinidad-1.0.0-incubating</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/adffaces/tags/trinidad-1.0.0-incubating</developerConnection>
+ </scm>
+
+
+ <modules>
+ <module>blank</module>
+ <module>trinidad-demo</module>
+ </modules>
+
+
+
+ <profiles>
+ <profile>
+ <id>generate-assembly</id>
+ <modules>
+ <module>blank</module>
+ <module>trinidad-demo</module>
+ <module>trinidad-example-assembly</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>staging</id>
+ <build>
+
+ <plugins>
+ <!-- We want to deploy the artifact to a staging location for perusal
+ mvn -Pstaging -Ddeploy.altRepository=scpexe://people.apache.org/www/people.apache.org/builds/myfaces/m2-staging-repository
+ -->
+ <plugin>
+ <inherited>true</inherited>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <altDeploymentRepository>${deploy.altRepository}</altDeploymentRepository>
+ <updateReleaseInfo>true</updateReleaseInfo>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>release</id>
+ <!--
+ NOTE: To use you need to enable this profile and pass in the passphrase:
+ mvn -Prelease -Dpassphrase=thephrase
+ -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-gpg-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>sign-artifacts</id>
+ <phase>verify</phase>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <version>2.0.2</version>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-javadoc-plugin</artifactId>
+ <version>2.2</version>
+ <executions>
+ <execution>
+ <id>attach-javadocs</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-scm-plugin</artifactId>
+ <executions>
+ <execution>
+ <phase>validate</phase>
+ <id>getting-scm.revision</id>
+ <goals><goal>update</goal></goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/pom.xml
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/pom.xml?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/pom.xml (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/pom.xml Thu Mar 29 00:50:53 2007
@@ -0,0 +1,205 @@
+<?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/maven-v4_0_0.xsd">
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+
+-->
+ <parent>
+ <groupId>org.apache.myfaces.trinidad</groupId>
+ <artifactId>trinidad</artifactId>
+ <version>1.0.0-incubating</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <name>Apache Trinidad Demo</name>
+ <description>Apache Trinidad Demo</description>
+
+ <artifactId>trinidad-demo</artifactId>
+ <packaging>war</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.myfaces.trinidadbuild</groupId>
+ <artifactId>maven-jdev-plugin</artifactId>
+ <configuration>
+ <libraries>
+ <library>JSP Runtime</library>
+ </libraries>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>trinidad-api</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${pom.groupId}</groupId>
+ <artifactId>trinidad-impl</artifactId>
+ <version>${pom.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>1.4</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>1.1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ <scope>runtime</scope>
+ </dependency>
+
+<!-- Dependencies pulled in via myfaces/ri pom
+ <dependency>
+ <groupId>commons-beanutils</groupId>
+ <artifactId>commons-beanutils</artifactId>
+ <version>1.6</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.5</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.0.4</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>2.1</version>
+ <scope>runtime</scope>
+ </dependency>
+-->
+
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <!-- By default the war examples use myfaces! :) -->
+ <profile>
+ <id>myfaces</id>
+ <activation>
+ <property>
+ <name>!jsf</name>
+ </property>
+ </activation>
+ <dependencies>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-api</artifactId>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.myfaces.core</groupId>
+ <artifactId>myfaces-impl</artifactId>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+
+ <properties>
+ <jsf_implementation>MyFaces</jsf_implementation>
+ </properties>
+ </profile>
+
+ <!-- To use the examples using the Sun's JSF Reference Implementation: -Djsf=ri -->
+ <profile>
+ <id>jsfri</id>
+ <activation>
+ <property>
+ <name>jsf</name>
+ <value>ri</value>
+ </property>
+ </activation>
+ <dependencies>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-api</artifactId>
+ <version>1.1_02</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.faces</groupId>
+ <artifactId>jsf-impl</artifactId>
+ <version>1.1_02</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>jstl</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.0</version>
+ <scope>compile</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>commons-digester</groupId>
+ <artifactId>commons-digester</artifactId>
+ <version>1.5</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ </dependencies>
+
+ <repositories>
+ <repository>
+ <id>java.net</id>
+ <name>java.net Maven 1 Repository</name>
+ <url>https://maven-repository.dev.java.net/nonav/repository</url>
+ <layout>legacy</layout>
+ </repository>
+ </repositories>
+
+ <properties>
+ <jsf_implementation>JSF-RI</jsf_implementation>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
\ No newline at end of file
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/pom.xml
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/adf-email-demo.properties.sample
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/adf-email-demo.properties.sample?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/adf-email-demo.properties.sample (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/adf-email-demo.properties.sample Thu Mar 29 00:50:53 2007
@@ -0,0 +1,4 @@
+username=adam.winer
+domain=oracle.com
+server=rgmamerimap.oraclecorp.com
+smtpserver=rgmamersmtp.oraclecorp.com
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/logging.properties
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/logging.properties?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/logging.properties (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/logging.properties Thu Mar 29 00:50:53 2007
@@ -0,0 +1,34 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+handlers = java.util.logging.ConsoleHandler
+
+# Set the default logging level for the root logger
+.level = ALL
+
+# Set the default logging level for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.level = INFO
+
+# Set the default logging level for new FileHandler instances
+#java.util.logging.FileHandler.level = ALL
+
+# Set the default formatter for new ConsoleHandler instances
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+# Set the default logging level for the logger named com.mycompany
+oracle.level = ALL
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/logging.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/conf/logging.properties
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ActionBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ActionBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ActionBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ActionBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+public class ActionBean
+
+{
+
+ public String nothing()
+
+ {
+
+ System.out.println("I AIN'T DOIN' NOTHIN'!");
+
+ return null;
+
+ }
+
+ public String app1()
+ {
+ return "app1";
+ }
+
+ public String app2()
+ {
+ return "app2";
+ }
+
+}
+
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ActionBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ActionBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AnimalsBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AnimalsBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AnimalsBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AnimalsBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,198 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+import java.util.ArrayList;
+import java.util.List;
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.event.RangeChangeEvent;
+
+public class AnimalsBean implements java.io.Serializable
+{
+ public AnimalsBean()
+ {
+ _names = new ArrayList<String>();
+ _names.add("Aardvark");
+ _names.add("Albatross ");
+ _names.add("Alligator");
+ _names.add("Anaconda");
+ _names.add("Antelope");
+ _names.add("Armadillo");
+ _names.add("Baboon");
+ _names.add("Badger");
+ _names.add("Bald eagle");
+ _names.add("Bear");
+ _names.add("Beaver");
+ _names.add("Bee");
+ _names.add("Bison");
+ _names.add("Bobcat");
+ _names.add("Butterfly");
+ _names.add("Camel");
+ _names.add("Capybara");
+ _names.add("Cardinal");
+ _names.add("Caterpillar");
+ _names.add("Catfish");
+ _names.add("Chameleon");
+ _names.add("Cheetah");
+ _names.add("Cooper's hawk");
+ _names.add("Cougar");
+ _names.add("Coyote");
+ _names.add("Crab");
+ _names.add("Cricket");
+ _names.add("Crane");
+ _names.add("Daddy longlegs");
+ _names.add("Deer mouse");
+ _names.add("Dog");
+ _names.add("Dolphin");
+ _names.add("Donkey");
+ _names.add("Dragonfly");
+ _names.add("Duck");
+ _names.add("Eagle");
+ _names.add("Eel");
+ _names.add("Egret");
+ _names.add("Elephant");
+ _names.add("Falcon");
+ _names.add("Fangtooth");
+ _names.add("Fantail");
+ _names.add("Finch");
+ _names.add("Flycatcher");
+ _names.add("Fox");
+ _names.add("Frog");
+ _names.add("Gecko");
+ _names.add("Gorilla");
+ _names.add("Grasshopper");
+ _names.add("Grouse");
+ _names.add("Gorilla");
+
+ _names.add("Hedgehog");
+ _names.add("Heron");
+ _names.add("Horned lizard");
+ _names.add("Hyena");
+
+ _names.add("Iguana");
+ _names.add("Ivory-billed woodpecker");
+
+ _names.add("Jackal");
+ _names.add("Jaguar");
+ _names.add("Jellyfish");
+
+ _names.add("Kingfisher");
+ _names.add("Kite");
+ _names.add("Koala");
+
+ _names.add("Ladybug");
+ _names.add("Lark");
+ _names.add("Lion");
+
+
+ _names.add("Macaw");
+ _names.add("Mandrill");
+ _names.add("Margay");
+ _names.add("Merlin");
+ _names.add("Mockingbird");
+ _names.add("Monkey");
+ _names.add("Mouse");
+
+ _names.add("Turkey");
+ _names.add("Vampire Bat");
+ _names.add("Wolf");
+ _names.add("Woodpecker");
+ _names.add("Yellow-bellied marmot");
+ _names.add("Zebra");
+ _names.add("Zorilla");
+ _end = _BLOCK_SIZE;
+ _namesInRange = _names.subList(_start, _end);
+ }
+
+ public List<String> getNames()
+ {
+ return _names;
+ }
+
+ public List<String> getNamesInRange()
+ {
+
+ return _namesInRange;
+ }
+
+
+ public int getStart()
+ {
+ return _start;
+ }
+
+
+ public int getEnd()
+ {
+ return _end;
+ }
+
+
+
+ public void rangeChange(RangeChangeEvent rce)
+ {
+ int oldStart = rce.getOldStart();
+ int oldEnd = rce.getOldEnd();
+ int newStart = rce.getNewStart();
+ int newEnd = rce.getNewEnd();
+
+ FacesContext context = FacesContext.getCurrentInstance();
+
+ String message = "Range changed from "
+ + oldStart +"-"+oldEnd+" to "
+ + newStart +"-"+newEnd;
+
+ context.addMessage(rce.getComponent().getClientId(context),
+ new FacesMessage(message));
+
+ _setStart(newStart);
+ _setEnd(newEnd);
+ _setNamesInRange(getNames().subList(_start, getEnd()));
+ }
+
+ private void _setStart(int start)
+ {
+ _start = start;
+
+ }
+
+ private void _setEnd(int end)
+ {
+ _end = end;
+ }
+
+ private void _setNamesInRange(List<String> namesInRange)
+ {
+ _namesInRange = namesInRange;
+
+ }
+ // start is inclusive of the range, end is exclusive. If you are showing
+ // the first 5 items, _start = 0, _end = 5.
+ private int _start = 0;
+ private int _end;
+
+ private List<String> _names;
+
+ private List<String> _namesInRange;
+
+ private static final int _BLOCK_SIZE = 5;
+
+}
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AnimalsBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AnimalsBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AtomBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AtomBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AtomBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AtomBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,84 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+import javax.faces.application.FacesMessage;
+import javax.faces.context.FacesContext;
+
+public class AtomBean implements java.io.Serializable
+{
+ String name;
+ String symbol;
+ int number;
+ String group;
+
+ public String action()
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ FacesMessage message = new FacesMessage("Clicked on Chemical " + getName());
+ context.addMessage(null, message);
+ return null;
+ }
+
+ public AtomBean()
+ {
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getSymbol()
+ {
+ return symbol;
+ }
+
+ public void setSymbol(String symbol)
+ {
+ this.symbol = symbol;
+ }
+
+ public int getNumber()
+ {
+ return number;
+ }
+
+ public void setNumber(int number)
+ {
+ this.number = number;
+ }
+
+ public String getGroup()
+ {
+ return group;
+ }
+
+ public void setGroup(String group)
+ {
+ this.group = group;
+ }
+
+
+}
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AtomBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/AtomBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarBackingBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarBackingBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarBackingBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarBackingBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,176 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.faces.component.UISelectItems;
+import javax.faces.event.ValueChangeEvent;
+import javax.faces.model.SelectItem;
+
+import org.apache.myfaces.trinidad.component.UIXOutput;
+import org.apache.myfaces.trinidad.component.core.nav.CoreCommandLink;
+
+import org.apache.myfaces.trinidad.event.ReturnEvent;
+
+public class CarBackingBean
+{
+ public List<SelectItem> getMakes()
+ {
+ return _MAKE_ITEMS;
+ }
+
+ public void makeChanged(ValueChangeEvent vce)
+ {
+
+ if ("".equals(vce.getNewValue()))
+ _modelItems.setValue(Collections.EMPTY_LIST);
+
+ Object newValue = vce.getNewValue();
+ if (newValue instanceof Car)
+ {
+ String newCar = ((Car)newValue).getName();
+ if ("cordera".equals(newCar))
+ _modelItems.setValue(_CORDERA_MODELS);
+ else if ("autumno".equals(newCar))
+ _modelItems.setValue(_AUTUMNO_MODELS);
+ else if ("grabowski".equals(newCar))
+ _modelItems.setValue(_GRABOWSKI_MODELS);
+ }
+
+ _options.setValue(null);
+ _price.setValue(null);
+ _launchOptions.setDisabled(true);
+ }
+
+ public void modelChanged(ValueChangeEvent vce)
+ {
+ _price.setValue(_getPriceOfCar(vce.getNewValue()));
+ _options.setValue(null);
+ _launchOptions.setDisabled("".equals(vce.getNewValue()));
+ }
+
+ public UISelectItems getModelItems() { return _modelItems; }
+ public void setModelItems(UISelectItems modelItems) { _modelItems = modelItems; }
+
+ public UIXOutput getPrice() { return _price; }
+ public void setPrice(UIXOutput price) { _price = price; }
+
+ public UIXOutput getOptions() { return _options; }
+ public void setOptions(UIXOutput options) { _options = options; }
+
+ public CoreCommandLink getLaunchOptions() { return _launchOptions; }
+ public void setLaunchOptions(CoreCommandLink launchOptions) { _launchOptions = launchOptions; }
+
+ public Object _getPriceOfCar(Object model)
+ {
+ return _PRICES.get(model);
+ }
+
+ @SuppressWarnings("unchecked")
+ public void returnOptions(ReturnEvent event)
+ {
+ Object value = event.getReturnValue();
+ StringBuffer buffer = new StringBuffer();
+ int addedPrice = 0;
+ if (value instanceof List)
+ {
+ for(CarOption option : (List<CarOption>) value)
+ {
+ addedPrice = addedPrice + option.getPrice();
+ if (buffer.length() != 0)
+ buffer.append(", ");
+ buffer.append(option.getName());
+ }
+ }
+
+ _options.setValue(buffer.toString());
+
+ Integer price = (Integer) _price.getValue();
+ _price.setValue(new Integer(price.intValue() + addedPrice));
+ }
+
+ private UIXOutput _price;
+ private UIXOutput _options;
+ private CoreCommandLink _launchOptions;
+ private UISelectItems _modelItems;
+
+ static private final List<SelectItem> _MAKE_ITEMS = new ArrayList<SelectItem>();
+ static private final List<SelectItem> _CORDERA_MODELS = new ArrayList<SelectItem>();
+ static private final List<SelectItem> _AUTUMNO_MODELS = new ArrayList<SelectItem>();
+ static private final List<SelectItem> _GRABOWSKI_MODELS = new ArrayList<SelectItem>();
+
+ static private final Map<String, Integer> _PRICES = new HashMap<String, Integer>();
+
+ static private final SelectItem _NULL_SELECT_ITEM = new SelectItem("");
+
+ static
+ {
+ _MAKE_ITEMS.add(_NULL_SELECT_ITEM);
+ // test a Car Object instead of a String in SelectItem.
+ // If you do not have a converter,
+ // make sure to use "useIndexValue='true'" in selectOne/selectMany
+ // component.
+ _MAKE_ITEMS.add(new SelectItem(new Car("cordera"), "Cordera Ltd."));
+ _MAKE_ITEMS.add(new SelectItem(new Car("autumno"), "Autumno Inc."));
+ _MAKE_ITEMS.add(new SelectItem(new Car("grabowski"), "Grabowski Motors"));
+
+ _CORDERA_MODELS.add(_NULL_SELECT_ITEM);
+ _CORDERA_MODELS.add(new SelectItem("XL", "XL"));
+ _CORDERA_MODELS.add(new SelectItem("SV", "SV"));
+ _CORDERA_MODELS.add(new SelectItem("DUH", "DUH"));
+
+ _AUTUMNO_MODELS.add(_NULL_SELECT_ITEM);
+ _AUTUMNO_MODELS.add(new SelectItem("390"));
+ _AUTUMNO_MODELS.add(new SelectItem("490"));
+ _AUTUMNO_MODELS.add(new SelectItem("585"));
+
+ _GRABOWSKI_MODELS.add(_NULL_SELECT_ITEM);
+ _GRABOWSKI_MODELS.add(new SelectItem("OneAndOnly"));
+
+ _PRICES.put("XL", new Integer(25000));
+ _PRICES.put("SV", new Integer(17000));
+ _PRICES.put("DUH", new Integer(12000));
+ _PRICES.put("390", new Integer(29500));
+ _PRICES.put("490", new Integer(39500));
+ _PRICES.put("585", new Integer(49500));
+ _PRICES.put("OneAndOnly", new Integer(116500));
+ }
+
+ // this is used to test a Car Object instead of a String in SelectItem
+ static private class Car
+ {
+ public Car (String name)
+ {
+ _name = name;
+ }
+ public String getName()
+ {
+ return _name;
+ }
+
+ private String _name;
+
+ }
+
+}
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarBackingBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarBackingBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOption.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOption.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOption.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOption.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+public class CarOption
+{
+ public CarOption(String name, int price)
+ {
+ _name = name;
+ _price = price;
+ }
+
+ public String getName()
+ {
+ return _name;
+ }
+
+ public int getPrice()
+ {
+ return _price;
+ }
+
+ private final String _name;
+ private final int _price;
+}
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOption.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOption.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOptionsBackingBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOptionsBackingBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOptionsBackingBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOptionsBackingBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,75 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.model.SelectItem;
+
+import org.apache.myfaces.trinidad.context.RequestContext;
+
+
+public class CarOptionsBackingBean
+{
+ public List<String> getOptions() { return _options; }
+ public void setOptions(List<String> options) { _options = options; }
+
+ public String pickOptions()
+ {
+ List<String> options = getOptions();
+ List<CarOption> realOptionObjects = new ArrayList<CarOption>();
+ for (int i = 0; i < _AVAILABLE_OPTIONS.length; i++)
+ {
+ if (options.contains("" + i))
+ realOptionObjects.add(_AVAILABLE_OPTIONS[i]);
+ }
+
+ RequestContext.getCurrentInstance().returnFromDialog(realOptionObjects,
+ null);
+ return null;
+ }
+
+ public List<SelectItem> getOptionsItems()
+ {
+ return _OPTIONS_ITEMS;
+ }
+
+ private List<String> _options;
+
+ static private final List<SelectItem> _OPTIONS_ITEMS = new ArrayList<SelectItem>();
+
+ static private final CarOption[] _AVAILABLE_OPTIONS =
+ {
+ new CarOption("Power windows", 350),
+ new CarOption("Automatic transmission", 990),
+ new CarOption("Side-curtain air bags", 600)
+ };
+
+ static
+ {
+ _OPTIONS_ITEMS.add(new SelectItem("0",
+ "Power windows ($350)"));
+ _OPTIONS_ITEMS.add(new SelectItem("1",
+ "Automatic transmission ($990)"));
+ _OPTIONS_ITEMS.add(new SelectItem("2",
+ "Side-curtain air-bags ($600)"));
+
+ }
+}
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOptionsBackingBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/CarOptionsBackingBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ChartBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ChartBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ChartBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ChartBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,368 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+import java.io.BufferedReader;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.io.StringWriter;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+
+import javax.faces.context.FacesContext;
+
+import org.apache.myfaces.trinidad.component.core.data.CoreChart;
+import org.apache.myfaces.trinidad.context.RequestContext;
+import org.apache.myfaces.trinidad.event.ChartDrillDownEvent;
+import org.apache.myfaces.trinidad.model.ChartModel;
+import org.apache.myfaces.trinidad.render.ExtendedRenderKitService;
+import org.apache.myfaces.trinidad.util.Service;
+
+
+/**
+ * Managed bean for chat component demos.
+ * @version $Name: $ ($Revision$) $Date$
+ */
+public class ChartBean implements java.io.Serializable
+{
+ public ChartModel getValue()
+ {
+ return _chartModel;
+ }
+
+ public ComponentEditorHandler getEditor()
+ {
+ return _editorBean;
+ }
+
+ public String updatePartial()
+ {
+ _editorBean.update();
+ RequestContext afContext = RequestContext.getCurrentInstance();
+ afContext.addPartialTarget(_editorBean.getComponent());
+ return null;
+ }
+
+ public boolean isLargerDataSet()
+ {
+ return _largerDataSet;
+ }
+
+ public void setLargerDataSet(boolean b)
+ {
+ _largerDataSet = b;
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if(_largerDataSet)
+ chart.setXMajorGridLineCount(1);
+ else
+ chart.setXMajorGridLineCount(-1);
+ }
+
+ public void drillDown(ChartDrillDownEvent event)
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+
+ String message = "seriesIndices : " + _getEventIntsAsString(event.getSeriesIndices()) +
+ " yValueIndices : " + _getEventIntsAsString(event.getYValueIndices()) +
+ " yValues :" + _getEventDoublesAsString(event.getYValues()) +
+ " xValues :" + _getEventDoublesAsString(event.getXValues());
+ ExtendedRenderKitService erks =
+ Service.getRenderKitService(context,
+ ExtendedRenderKitService.class);
+ erks.addScript(context,
+ "alert('Confirmation from ChartBean: " +
+ message +
+ "');");
+ }
+
+ private String _getEventIntsAsString(int[] intArray)
+ {
+ if(intArray!=null)
+ {
+ StringWriter sw = new StringWriter();
+ for(int i=0; i<intArray.length; ++i)
+ {
+ if(i!=0)
+ sw.append(',');
+ sw.append(String.valueOf(intArray[i]));
+ }
+ return sw.toString();
+ }
+ else
+ return null;
+ }
+
+ private String _getEventDoublesAsString(double[] intArray)
+ {
+ if(intArray!=null)
+ {
+ StringWriter sw = new StringWriter();
+ for(int i=0; i<intArray.length; ++i)
+ {
+ if(i!=0)
+ sw.append(',');
+ sw.append(String.valueOf(intArray[i]));
+ }
+ return sw.toString();
+ }
+ else
+ return null;
+ }
+
+
+ private class MyChartModel extends ChartModel
+ {
+ @Override
+ public List<String> getSeriesLabels()
+ {
+ if(_largerDataSet)
+ return _largeSeriesLabels;
+ else
+ return _seriesLabels;
+ }
+
+ @Override
+ public List<String> getGroupLabels()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if("circularGauge".equals(chart.getType()) ||
+ "semiCircularGauge".equals(chart.getType()) ||
+ !_largerDataSet)
+ return _groupLabels;
+ else
+ return _largeGroupLabels;
+ }
+
+ @Override
+ public List<List<Double>> getXValues()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if("XYLine".equals(chart.getType()) || "scatterPlot".equals(chart.getType()))
+ {
+ if(_largerDataSet)
+ {
+ if(_largerXValues == null)
+ {
+ _largerXValues = new ArrayList<List<Double>>();
+ _loadLargerValues(_largerXValues, "/components/chartData/NasdaqXData.txt");
+ }
+ return _largerXValues;
+ }
+ return _chartXValues;
+ }
+ else
+ return null;
+ }
+
+ @Override
+ public List<List<Double>> getYValues()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if("circularGauge".equals(chart.getType()) ||
+ "semiCircularGauge".equals(chart.getType()))
+ return _dialchartYValues;
+ else
+ {
+ if(_largerDataSet)
+ {
+ if(_largerYValues == null)
+ {
+ _largerYValues = new ArrayList<List<Double>>();
+ _loadLargerValues(_largerYValues, "/components/chartData/NasdaqData.txt");
+ }
+ return _largerYValues;
+ }
+ return _chartYValues;
+ }
+ }
+
+ private void _loadLargerValues(ArrayList<List<Double>> valuesList, String file)
+ {
+ FacesContext context = FacesContext.getCurrentInstance();
+ InputStream in = context.getExternalContext().getResourceAsStream(file);
+ if(in != null)
+ {
+
+ BufferedReader rd
+ = new BufferedReader(new InputStreamReader(in));
+
+ String line;
+ try
+ {
+ while((line = rd.readLine())!=null)
+ {
+ String[] strings = line.split("\t");
+ ArrayList<Double> values = new ArrayList<Double>(strings.length);
+ for(String s:strings)
+ {
+ values.add(Double.parseDouble(s));
+ }
+ valuesList.add(values);
+ }
+ }
+ catch(IOException ioe)
+ {
+ System.out.println("error reading chart data");
+ }
+ }
+ }
+
+ @Override
+ public Double getMaxYValue()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if("circularGauge".equals(chart.getType()) ||
+ "semiCircularGauge".equals(chart.getType()))
+ return 200.0;
+ else if("stackedVerticalBar".equals(chart.getType()) ||
+ "stackedHorizontalBar".equals(chart.getType()) ||
+ "stackedArea".equals(chart.getType()))
+ {
+ if(_largerDataSet)
+ return 7500.0;
+ else
+ return 500000.0;
+ }
+ else
+ {
+ if(_largerDataSet)
+ return 2500.0;
+ else
+ return 200000.0;
+ }
+ }
+
+ @Override
+ public Double getMinYValue()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if(!"circularGauge".equals(chart.getType()) &&
+ !"semiCircularGauge".equals(chart.getType()) &&
+ !"stackedVerticalBar".equals(chart.getType()) &&
+ !"stackedHorizontalBar".equals(chart.getType()) &&
+ !"stackedArea".equals(chart.getType()) &&
+ _largerDataSet)
+ {
+ return 2000.0;
+ }
+ return 0.0;
+ }
+
+ @Override
+ public Double getMaxXValue()
+ {
+ if(_largerDataSet)
+ return 54.0;
+ else
+ return 10.0;
+ }
+
+ @Override
+ public Double getMinXValue()
+ {
+ if(_largerDataSet)
+ return 0.0;
+ else
+ return 6.0;
+ }
+
+ @Override
+ public String getTitle()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if("circularGauge".equals(chart.getType()) ||
+ "semiCircularGauge".equals(chart.getType()))
+ return "Values in 1000s";
+ else
+ {
+ if(_largerDataSet)
+ return "NASDAQ Q4 2005 - Q3 2006";
+ else
+ return "Title";
+ }
+ }
+
+ @Override
+ public String getSubTitle()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if("circularGauge".equals(chart.getType()) ||
+ "semiCircularGauge".equals(chart.getType()) || _largerDataSet)
+ return null;
+ else
+ return "SubTitle";
+ }
+
+ @Override
+ public String getFootNote()
+ {
+ CoreChart chart = (CoreChart)_editorBean.getComponent();
+ if("circularGauge".equals(chart.getType()) ||
+ "semiCircularGauge".equals(chart.getType()) || _largerDataSet)
+ return null;
+ else
+ return "FootNote";
+ }
+
+ private final List<String> _groupLabels =
+ Arrays.asList(new String[]{"June", "July", "August", "September","October"});
+
+ private final List<String> _largeGroupLabels =
+ Arrays.asList(new String[]{"Q4-2005", "Q1-2006", "Q2-2006", "Q3-2006"});
+
+ private final List<String> _seriesLabels =
+ Arrays.asList(new String[]{"Previous", "Target", "Actual"});
+
+ private final List<String> _largeSeriesLabels =
+ Arrays.asList(new String[]{"Opening", "Low", "High"});
+
+ private final ArrayList<List<Double>> _chartYValues;
+ private final ArrayList<List<Double>> _chartXValues;
+ private final ArrayList<List<Double>> _dialchartYValues;
+ private ArrayList<List<Double>> _largerYValues;
+ private ArrayList<List<Double>> _largerXValues;
+ {
+ _chartYValues = new ArrayList<List<Double>>();
+ _chartYValues.add(Arrays.asList(new Double[]{135235.0, 155535.0, 141725.0}));
+ _chartYValues.add(Arrays.asList(new Double[]{106765., 131725., 127868.}));
+ _chartYValues.add(Arrays.asList(new Double[]{108456., 119326., 139326.}));
+ _chartYValues.add(Arrays.asList(new Double[]{136765., 147265., 184349.}));
+ _chartYValues.add(Arrays.asList(new Double[]{107868., 113968., 174349.}));
+
+ _dialchartYValues = new ArrayList<List<Double>>();
+ _dialchartYValues.add(Arrays.asList(new Double[]{135.}));
+ _dialchartYValues.add(Arrays.asList(new Double[]{106.}));
+
+ _chartXValues = new ArrayList<List<Double>>();
+ _chartXValues.add(Arrays.asList(new Double[]{6.1, 6.3, 6.5}));
+ _chartXValues.add(Arrays.asList(new Double[]{6.8, 7.1, 7.3}));
+ _chartXValues.add(Arrays.asList(new Double[]{7.6, 7.8, 8.0}));
+ _chartXValues.add(Arrays.asList(new Double[]{8.25, 8.55, 8.78}));
+ _chartXValues.add(Arrays.asList(new Double[]{9.23, 9.48, 9.88}));
+ }
+
+ }
+
+ private boolean _largerDataSet = false;
+ private final ChartModel _chartModel = new MyChartModel();
+ private final ComponentEditorHandler _editorBean = new ComponentEditorHandler();
+}
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ChartBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ChartBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ClientValidationBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ClientValidationBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ClientValidationBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ClientValidationBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,230 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+public class ClientValidationBean implements java.io.Serializable
+{
+
+ public ClientValidationBean()
+ {
+ }
+
+ public BigDecimal getBigDecimal()
+ {
+ return _bigDecimal ;
+ }
+
+ public void setBigDecimal(BigDecimal bigDecimal)
+ {
+ _bigDecimal = bigDecimal;
+ }
+
+
+ public Integer getInteger()
+ {
+ return _integer ;
+ }
+
+ public void setInteger(Integer integer)
+ {
+ _integer = integer;
+ }
+
+ public Short getShort()
+ {
+ return _short ;
+ }
+
+ public void setShort(Short shortObj)
+ {
+ _short = shortObj;
+ }
+
+ public Byte getByte()
+ {
+ return _byte ;
+ }
+
+ public void setByte(Byte byteObj)
+ {
+ _byte = byteObj;
+ }
+
+ public Long getLong()
+ {
+ return _long ;
+ }
+
+ public void setLong(Long longObj)
+ {
+ _long = longObj;
+ }
+
+ public Long getLong2()
+ {
+ return _long2 ;
+ }
+
+ public void setLong2(Long longObj)
+ {
+ _long2 = longObj;
+ }
+
+ public Long getLongValue()
+ {
+ return _longValue ;
+ }
+
+ public void setLongValue(Long longObj)
+ {
+ _longValue = longObj;
+ }
+
+ public Float getFloat()
+ {
+ return _float ;
+ }
+
+ public void setFloat(Float floatObj)
+ {
+ _float = floatObj;
+ }
+
+ public Double getDouble()
+ {
+ return _double ;
+ }
+
+ public void setDouble(Double doubleObj)
+ {
+ _double = doubleObj;
+ }
+
+
+ public Double getDouble2()
+ {
+ return _double2 ;
+ }
+
+ public void setDouble2(Double doubleObj)
+ {
+ _double2 = doubleObj;
+ }
+
+
+ public Double getDouble3()
+ {
+ return _double3 ;
+ }
+
+ public void setDouble3(Double doubleObj)
+ {
+ _double3 = doubleObj;
+ }
+
+
+ public String getText()
+ {
+ return _text ;
+ }
+
+ public void setText(String text)
+ {
+ _text = text;
+ }
+
+ public Integer getSsn()
+ {
+ return _ssn ;
+ }
+
+ public void setSsn(Integer ssn)
+ {
+ _ssn = ssn;
+ }
+
+
+ public String getRegExpValue()
+ {
+ return _regExpValue;
+ }
+
+ public void setRegExpValue(String regExpValue)
+ {
+ _regExpValue = regExpValue;
+ }
+
+ public String getByteLengthValue()
+ {
+ return _byteLegthValue;
+ }
+
+ public void setByteLengthValue(String value)
+ {
+ _byteLegthValue = value;
+ }
+
+
+ public String getLengthValue()
+ {
+ return _legthValue;
+ }
+
+ public void setLengthValue(String value)
+ {
+ _legthValue = value;
+ }
+
+ public Date getDate()
+ {
+ return _date;
+ }
+
+ public void setDate(Date date)
+ {
+ _date = date;
+ }
+
+
+ private Integer _ssn = null;
+ private String _text = "This is bound text";
+ private Integer _integer = null;
+ private BigDecimal _bigDecimal = null;
+ private Long _long = null;
+ private Long _longValue = null;
+ private Long _long2 = null;
+ private Short _short = null;
+ private Byte _byte = null;
+ private Double _double = null;
+ private Double _double2 = null;
+ private Double _double3 = null;
+ private Float _float = null;
+
+ private String _regExpValue = null;
+
+ private String _byteLegthValue = null;
+ private String _legthValue = null;
+ private Date _date = new Date();
+
+
+}
+
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ClientValidationBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ClientValidationBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL
Added: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ColorBean.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ColorBean.java?view=auto&rev=523607
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ColorBean.java (added)
+++ incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ColorBean.java Thu Mar 29 00:50:53 2007
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.myfaces.trinidaddemo;
+
+import java.awt.Color;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Managed bean for color component demos.
+ * @version $Name: $ ($Revision$) $Date$
+ */
+public class ColorBean implements java.io.Serializable
+{
+ public Color getColorValue1()
+ {
+ return _colorValue1;
+ }
+
+ public void setColorValue1(Color colorValue)
+ {
+ _colorValue1 = colorValue;
+ }
+
+ public Color getColorValue2()
+ {
+ return _colorValue2;
+ }
+
+ public void setColorValue2(Color colorValue)
+ {
+ _colorValue2 = colorValue;
+ }
+
+ public Color getColorValue3()
+ {
+ return _colorValue3;
+ }
+
+ public void setColorValue3(Color colorValue)
+ {
+ _colorValue3 = colorValue;
+ }
+
+ public Color getColorValue4()
+ {
+ return _colorValue4;
+ }
+
+ public void setColorValue4(Color colorValue)
+ {
+ _colorValue4 = colorValue;
+ }
+
+ public Color[] getColorArray()
+ {
+ Color[] colorArray = new Color[4];
+ colorArray[0] = _colorValue1;
+ colorArray[1] = _colorValue2;
+ colorArray[2] = _colorValue3;
+ colorArray[3] = _colorValue4;
+ return colorArray;
+ }
+
+ public List<Color> getColorList()
+ {
+ List<Color> colorList = new ArrayList<Color>();
+ colorList.add(_colorValue3);
+ colorList.add(_colorValue1);
+ colorList.add(_colorValue4);
+ colorList.add(_colorValue2);
+ return colorList;
+ }
+
+ private Color _colorValue1 = new Color(255, 0, 0);
+ private Color _colorValue2 = new Color(0, 255, 0);
+ private Color _colorValue3 = new Color(0, 0, 255);
+ private Color _colorValue4 = new Color(255, 255, 0);
+
+}
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ColorBean.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/adffaces/trunk/trinidad/trinidad-examples/trinidad-demo/src/main/java/org/apache/myfaces/trinidaddemo/ColorBean.java
------------------------------------------------------------------------------
svn:keywords = Date Author Id Revision HeadURL