JBoss Rich Faces SVN: r10754 - in trunk/docs/cdkguide/en/src/main/resources: images and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-15 03:27:15 -0400 (Wed, 15 Oct 2008)
New Revision: 10754
Added:
trunk/docs/cdkguide/en/src/main/resources/examples/pom.xml
trunk/docs/cdkguide/en/src/main/resources/images/root.png
Log:
https://jira.jboss.org/jira/browse/RF-3692 - 'Developer sample creation' is done
Added: trunk/docs/cdkguide/en/src/main/resources/examples/pom.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/resources/examples/pom.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/resources/examples/pom.xml 2008-10-15 07:27:15 UTC (rev 10754)
@@ -0,0 +1,52 @@
+<?xml version="1.0"?><project>
+ <parent>
+ <artifactId>sand_test</artifactId>
+ <groupId>org.mycompany</groupId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.mycompany</groupId>
+ <artifactId>inputDate-sample</artifactId>
+ <packaging>war</packaging>
+ <name>inputDate-sample Maven Webapp</name>
+ <version>1.0-SNAPSHOT</version>
+ <build>
+ <finalName>inputDate-sample</finalName>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.5</version>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8080</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mycompany</groupId>
+ <artifactId>inputDate</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/docs/cdkguide/en/src/main/resources/examples/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/docs/cdkguide/en/src/main/resources/images/root.png
===================================================================
(Binary files differ)
Property changes on: trunk/docs/cdkguide/en/src/main/resources/images/root.png
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ application/octet-stream
16 years, 11 months
JBoss Rich Faces SVN: r10753 - trunk/docs/cdkguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-15 03:26:30 -0400 (Wed, 15 Oct 2008)
New Revision: 10753
Added:
trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - 'Developer sample creation' is done
Added: trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml (rev 0)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml 2008-10-15 07:26:30 UTC (rev 10753)
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="devsample" xreflabel="devsample">
+ <?dbhtml filename="devsample.html"?>
+ <chapterinfo>
+ <keywordset>
+ <keyword>devsample</keyword>
+ <keyword>CDK</keyword>
+ <keyword>Guide</keyword>
+ </keywordset>
+ </chapterinfo>
+
+ <title>Developer sample creation</title>
+ <para>
+ The <property>RichFaces CDK</property> allows you to create samples easier as it has been discussed earlier
+ in the <link linkend="overview">"Component usage overview"</link> chapter.
+ Let's create a simple JSF project, called <property>inputDate-sample</property> for example,
+ with the help of the <property>maven-archetype-jsfwebapp</property> archetype.
+ </para>
+ <para>
+ It is necessary to proceed to your <property>Sandbox</property> directory
+ where you have created the <emphasis role="bold"><property><inputDate></property></emphasis> component
+ and launch the following command (all in one line):
+ </para>
+ <programlisting role="XML"><![CDATA[mvn archetype:create -DarchetypeGroupId=org.richfaces.cdk -DarchetypeArtifactId=maven-archetype-jsfwebapp -DarchetypeVersion=3.3.0.GA -DgroupId=org.mycompany -DartifactId=inputDate-sample]]></programlisting>
+ <para>
+ As easy to see a new directory <property>inputDate-sample</property> is created with the predefined JSF project structure:
+ </para>
+ <figure>
+ <title>The predefined JSF project structure</title>
+ <mediaobject>
+ <imageobject>
+ <imagedata fileref="images/root.png"/>
+ </imageobject>
+ </mediaobject>
+ </figure>
+ <para>
+ It should be pointed out that <property>maven-archetype-jsfwebapp</property> archetype creates
+ skeletons of the following files:
+ JSP page,
+ Facelets page,
+ managed bean already registered in the <property>faces-config.xml</property>,
+ complete deployment descriptor (<property>web.xml</property>).
+ </para>
+ <para>
+ Now it is necessary to edit a JSP page, managed bean skeletons, and add the proper dependency
+ to the <property>pom.xml</property> file of the <property>inputDate-sample</property> project.
+ </para>
+ <section id="devsample_jsppage">
+ <title>JSP Page</title>
+ <para>
+ You should proceed to the <property>inputDate-sample/src/main/webapp/pages</property> directory
+ and edit <property>index.jsp</property> file.
+ You should add a form with our <emphasis role="bold"><property><inputDate></property></emphasis> component.
+ </para>
+ <para>
+ Here is the full page (index.jsp):
+ </para>
+
+ <programlisting role="XML"><![CDATA[
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://mycompany.org/inputDate" prefix="my"%>
+<html>
+ <head>
+ <title>My inputDate</title>
+ </head>
+ <body>
+ <f:view>
+ <h:form>
+ <my:inputDate value="#{bean.text}">
+ <f:facet name="caption">
+ <f:verbatim>
+ Calendar:
+ </f:verbatim>
+ </f:facet>
+ </my:inputDate>
+ <h:commandButton value="Submit" />
+ </h:form>
+ </f:view>
+ </body>
+</html>
+]]></programlisting>
+ </section>
+ <section id="devsample_dataBean">
+ <title>Data Bean</title>
+ <para>
+ In order to build this application, you should edit already created managed bean:
+ </para>
+
+ <programlisting role="JAVA"><![CDATA[
+package org.mycompany;
+
+public class Bean {
+
+ private String text = null;
+
+ public Bean() {
+
+ }
+
+ public String getText() {
+ return text;
+ }
+
+ public void setText(String text) {
+ this.text = text;
+ }
+}
+]]></programlisting>
+ </section>
+ <section id="devsample_pom">
+ <title>pom.xml</title>
+ <para>
+ In order to use any component on a page (JSF, Facelets, RichFaces, etc.) you should
+ add necessary libraries to the JSF project. Sometime it takes a lot of time to get
+ all the dependencies of a particular library. You should also prevent versions conflict if the
+ library already exists on a server.
+ Now we are going to add necessary libraries to the JSF project, deploy and run project on
+ a server. <property>Maven</property> will help us.
+ </para>
+ <para>
+ <property>Maven</property> is a high-level, intelligent build and deployment tool
+ designed to take much of the hard work out of the build process.
+ In Maven's Project Object Model (POM) file we could declare necessary
+ dependent libraries and Maven plugins used to manage all parts of the build process.
+ </para>
+ <para>
+ Our <emphasis role="bold"><property><inputDate></property></emphasis> component depends on JSF and RichFaces
+ libraries.
+ If you declare <property>inputDate</property> dependency in
+ the <property>inputDate-sample</property> project's POM
+ all the necessary libraries will be added automatically.
+ Therefore you need to delete <property>richfaces-ui</property> artifact out of
+ dependencies first and then add only one <property>inputDate</property> dependency:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<dependency>
+ <groupId>org.mycompany</groupId>
+ <artifactId>inputDate</artifactId>
+ <version>1.0-SNAPSHOT</version>
+</dependency>
+...]]></programlisting>
+ <para>
+ Now it is possible to build the <property>inputDate-sample</property> project with the help of the following command:
+ </para>
+ <programlisting role="XML"><![CDATA[mvn install]]></programlisting>
+ <para>
+ The final step is to deploy and run the project on a server.
+ One of the convenient features of Maven is the <link url="http://mojo.codehaus.org/jetty-maven-plugin/usage.html">Jetty plugin</link>.
+ <link url="http://www.mortbay.org/jetty/">Jetty</link> is an open-source web server implemented entirely in Java.
+ In order to deploy and run the project on the <property>Jetty</property> you should take the following steps:
+ </para>
+ <itemizedlist>
+ <listitem>
+ <para>
+ add the <property>maven-jetty-plugin</property> to the <property>pom.xml</property>:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+<plugin>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>maven-jetty-plugin</artifactId>
+ <version>6.1.5</version>
+ <configuration>
+ <scanIntervalSeconds>10</scanIntervalSeconds>
+ <connectors>
+ <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
+ <port>8080</port>
+ <maxIdleTime>60000</maxIdleTime>
+ </connector>
+ </connectors>
+ </configuration>
+</plugin>
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ launch the following command in the <property>inputDate-sample</property> directory:
+ </para>
+ <programlisting role="XML"><![CDATA[...
+mvn jetty:run
+...]]></programlisting>
+ </listitem>
+ <listitem>
+ <para>
+ after the scanner has been started
+ point your browser at <ulink url="http://localhost:8080/inputDate-sample">http://localhost:8080/inputDate-sample</ulink>.
+ </para>
+ </listitem>
+ </itemizedlist>
+ <para>
+ That' all! Your sample JSF project has been created.
+ </para>
+ <para>
+ Here you can find the whole <ulink url="examples/pom.xml">pom.xml</ulink> file.
+ </para>
+ </section>
+</chapter>
\ No newline at end of file
Property changes on: trunk/docs/cdkguide/en/src/main/docbook/modules/devsample.xml
___________________________________________________________________
Name: svn:executable
+ *
16 years, 11 months
JBoss Rich Faces SVN: r10752 - Suite and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-10-14 12:42:59 -0400 (Tue, 14 Oct 2008)
New Revision: 10752
Modified:
trunk/test-applications/qa/Performance Suite/Performance Test Suite Blank 3.2.0 (1).doc
Log:
Modified: trunk/test-applications/qa/Performance Suite/Performance Test Suite Blank 3.2.0 (1).doc
===================================================================
(Binary files differ)
16 years, 11 months
JBoss Rich Faces SVN: r10751 - trunk/framework/impl/src/main/java/org/ajax4jsf/application.
by richfaces-svn-commits@lists.jboss.org
Author: nbelaevski
Date: 2008-10-14 12:41:02 -0400 (Tue, 14 Oct 2008)
New Revision: 10751
Modified:
trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
Log:
https://jira.jboss.org/jira/browse/RF-4551
Modified: trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java
===================================================================
--- trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2008-10-14 15:17:13 UTC (rev 10750)
+++ trunk/framework/impl/src/main/java/org/ajax4jsf/application/AjaxViewHandler.java 2008-10-14 16:41:02 UTC (rev 10751)
@@ -39,6 +39,7 @@
import org.ajax4jsf.resource.InternetResource;
import org.ajax4jsf.resource.InternetResourceBuilder;
import org.ajax4jsf.webapp.BaseFilter;
+import org.ajax4jsf.webapp.FilterServletResponseWrapper;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.event.RenderPhaseComponentListener;
@@ -200,19 +201,25 @@
}
Map<String,Object> requestMap = context.getExternalContext().getRequestMap();
- if (null != requestMap.get(BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE)) {
- if (!Boolean.TRUE.equals(requestMap.get(RESOURCES_PROCESSED))) {
- ViewResources viewResources = new ViewResources();
-
- viewResources.initialize(context);
- viewResources.processHeadResources(context);
-
- requestMap.put(AjaxContext.HEAD_EVENTS_PARAMETER, viewResources.getHeadEvents());
-
- // Mark as processed.
- requestMap.put(RESOURCES_PROCESSED, Boolean.TRUE);
+ FilterServletResponseWrapper filterServletResponseWrapper = (FilterServletResponseWrapper)
+ requestMap.get(BaseFilter.RESPONSE_WRAPPER_ATTRIBUTE);
+ if (null != filterServletResponseWrapper) {
+ if (!filterServletResponseWrapper.isError()) {
+ if (!Boolean.TRUE.equals(requestMap.get(RESOURCES_PROCESSED))) {
+
+ ViewResources viewResources = new ViewResources();
+
+ viewResources.initialize(context);
+ viewResources.processHeadResources(context);
+
+ requestMap.put(AjaxContext.HEAD_EVENTS_PARAMETER, viewResources.getHeadEvents());
+
+ // Mark as processed.
+ requestMap.put(RESOURCES_PROCESSED, Boolean.TRUE);
+ }
}
+
// Save viewId for a parser selection
requestMap.put(AjaxViewHandler.VIEW_ID_KEY, context.getViewRoot().getViewId());
}
16 years, 11 months
JBoss Rich Faces SVN: r10750 - in trunk/sandbox: ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-10-14 11:17:13 -0400 (Tue, 14 Oct 2008)
New Revision: 10750
Modified:
trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
Log:
editor resource loading updates
Modified: trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml 2008-10-14 15:08:28 UTC (rev 10749)
+++ trunk/sandbox/samples/editor-sample/src/main/webapp/WEB-INF/web.xml 2008-10-14 15:17:13 UTC (rev 10750)
@@ -40,7 +40,7 @@
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
- <servlet>
+ <!--servlet>
<display-name>TinyMCE Loader Servlet</display-name>
<servlet-name>TinyMCELoaderServlet</servlet-name>
<servlet-class>org.richfaces.component.TinyMceLoaderServlet</servlet-class>
@@ -48,7 +48,7 @@
<servlet-mapping>
<servlet-name>TinyMCELoaderServlet</servlet-name>
<url-pattern>/a4j/g/3_3_0-SNAPSHOTorg/richfaces/renderkit/html/scripts/tiny_mce/*</url-pattern>
- </servlet-mapping>
+ </servlet-mapping--!>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-14 15:08:28 UTC (rev 10749)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/editor.js 2008-10-14 15:17:13 UTC (rev 10750)
@@ -1,10 +1,11 @@
-if (!Richfaces) Richfaces = {};
+if (!window.Richfaces) window.Richfaces = {};
Richfaces.Editor = {};
-Richfaces.Editor.getResourceURL = function (baseURL, type) {
+Richfaces.Editor.preInit = {extSuffix:".jsf"};
+/*Richfaces.Editor.getResourceURL = function (baseURL, type) {
return Richfaces.Editor.ResourceHTML.replace("$1", baseURL);
-};
+};*/
-Richfaces.Editor.ResourceHTML = "ghdfgsdfgsdfgsdfgdf sg sdfg$1fgsdfdfgdfg";
+//Richfaces.Editor.ResourceHTML = "ghdfgsdfgsdfgsdfgdf sg sdfg$1fgsdfdfgdfg";
RichEditor = Class.create();
Object.extend(RichEditor.prototype, {
Modified: trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js
===================================================================
--- trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-10-14 15:08:28 UTC (rev 10749)
+++ trunk/sandbox/ui/editor/src/main/resources/org/richfaces/renderkit/html/scripts/tiny_mce/tiny_mce_src.js 2008-10-14 15:17:13 UTC (rev 10750)
@@ -18,6 +18,10 @@
t.isGecko = !t.isWebKit && /Gecko/.test(ua);
t.isMac = ua.indexOf('Mac') != -1;
+ if (Richfaces.Editor && Richfaces.Editor.preInit)
+ {
+ t.extSuffix = Richfaces.Editor.preInit.extSuffix;
+ }
// TinyMCE .NET webcontrol might be setting the values for TinyMCE
if (w.tinyMCEPreInit) {
t.suffix = tinyMCEPreInit.suffix;
@@ -407,7 +411,8 @@
_addVer : function(u) {
var v;
-
+
+ if (this.extSuffix) u += this.extSuffix;
if (!this.query)
return u;
16 years, 11 months
JBoss Rich Faces SVN: r10749 - trunk/docs/cdkguide/en/src/main/docbook/modules.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-10-14 11:08:28 -0400 (Tue, 14 Oct 2008)
New Revision: 10749
Modified:
trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
Log:
https://jira.jboss.org/jira/browse/RF-3692 - 'Developer sample creation' is done
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2008-10-14 14:45:03 UTC (rev 10748)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/overview.xml 2008-10-14 15:08:28 UTC (rev 10749)
@@ -11,7 +11,7 @@
</chapterinfo>
<title>Component usage overview</title>
<para>
- After the <emphasis role="bold"><property><inputDate></property></emphasis> component has been created syou could use it on a page.
+ After the <emphasis role="bold"><property><inputDate></property></emphasis> component has been created you could use it on a page.
Create a simple JSF project, called <property>myapp</property> for example, with only one JSP page that has a form with our
<emphasis role="bold"><property><inputDate></property></emphasis> component.
</para>
Modified: trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml
===================================================================
--- trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2008-10-14 14:45:03 UTC (rev 10748)
+++ trunk/docs/cdkguide/en/src/main/docbook/modules/setup.xml 2008-10-14 15:08:28 UTC (rev 10749)
@@ -120,7 +120,7 @@
<listitem>
<para> Create a file named <property>pom.xml</property> in the directory with the
following content: </para>
- <programlisting role="XML"><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
+ <programlisting id="project_pom" role="XML"><![CDATA[<?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">
@@ -202,17 +202,27 @@
</thead>
<tbody>
<row>
- <entry> groupId </entry>
- <entry> Prefix for the Java package structure of your library </entry>
+ <entry>groupId</entry>
+ <entry>Prefix for the Java package structure of your library</entry>
</row>
<row>
- <entry> url </entry>
- <entry> Namespace for your library to be used in the TLD file </entry>
+ <entry>url </entry>
+ <entry>Namespace for your library to be used in the TLD file</entry>
</row>
<row>
- <entry> version </entry>
- <entry> Version of your library </entry>
+ <entry>version</entry>
+ <entry>Version of your library</entry>
</row>
+ <row>
+ <entry>scope</entry>
+ <entry>
+ Dependency scope is used to limit the transitivity of a depedency, and also to affect the classpath used for various build tasks.
+ "Provided" scope indicates you expect the JDK or a container to provide the dependency at runtime.
+ For example, when you build a web application with RichFaces,
+ you would set the dependency on the Servlet API and related libraries to scope
+ "provided" because the web container provides those classes.
+ </entry>
+ </row>
</tbody>
</tgroup>
</table>
16 years, 11 months
JBoss Rich Faces SVN: r10748 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: smukhina
Date: 2008-10-14 10:45:03 -0400 (Tue, 14 Oct 2008)
New Revision: 10748
Modified:
trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
Log:
https://jira.jboss.org/jira/browse/RF-4519
Modified: trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2008-10-14 14:41:55 UTC (rev 10747)
+++ trunk/docs/userguide/en/src/main/docbook/included/treeNode.xml 2008-10-14 14:45:03 UTC (rev 10748)
@@ -153,9 +153,9 @@
It's only necessary to mention that each node could also be a Drag element as well as
a Drop container, i.e. the container and the element have all attributes, listeners and ways
of behavior similar to the ones of the <emphasis role="bold">
- <property><rich:draggable></property>
+ <property><rich:dragSupport ></property>
</emphasis> and <emphasis role="bold">
- <property><rich:dropZone></property>
+ <property><rich:dropSupport ></property>
</emphasis> components simultaneously.</para>
</section>
<section>
16 years, 11 months
JBoss Rich Faces SVN: r10747 - in trunk/test-applications/seleniumTest/richfaces/src: main/webapp/pages/listShuttle and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-10-14 10:41:55 -0400 (Tue, 14 Oct 2008)
New Revision: 10747
Modified:
trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
Log:
JS API is present and works
component with rendered = false is not present on the page
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java 2008-10-14 14:39:36 UTC (rev 10746)
+++ trunk/test-applications/seleniumTest/richfaces/src/main/java/org/ajax4jsf/bean/ListShuttleBean.java 2008-10-14 14:41:55 UTC (rev 10747)
@@ -17,6 +17,7 @@
private boolean showButtonLabels;
private boolean switchByClick;
+ private boolean rendered;
public ListShuttleBean() {
init();
@@ -27,6 +28,7 @@
targetRequired = false;
showButtonLabels = true;
switchByClick = false;
+ rendered = true;
items = new ArrayList<ListShuttleItem>();
freeItems = new ArrayList<ListShuttleItem>();
for (int i = 0; i < 5; i++) {
@@ -104,4 +106,12 @@
public void setSwitchByClick(boolean switchByClick) {
this.switchByClick = switchByClick;
}
+
+ public boolean getRendered() {
+ return rendered;
+ }
+
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/main/webapp/pages/listShuttle/listShuttleTest.xhtml
===================================================================
(Binary files differ)
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-14 14:39:36 UTC (rev 10746)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/ListShuttleTest.java 2008-10-14 14:41:55 UTC (rev 10747)
@@ -18,6 +18,8 @@
String parentId;
+ String lsId;
+
String availebleListId;
String targetListId;
@@ -56,9 +58,12 @@
String switchByClickId;
+ String renderedId;
+
private void init(Template template) {
renderPage(template, initMethod);
parentId = getParentId() + "_form:";
+ lsId = parentId + "ls";
availebleListId = parentId + "lstbody";
targetListId = parentId + "lstlTbody";
copyAllId = parentId + "lscopyAll";
@@ -78,10 +83,101 @@
targetRequiredId = attrFormId + ":targetRequiredId";
showButtonLabelsId = attrFormId + ":showButtonLabelsId";
switchByClickId = attrFormId + ":switchByClickId";
- }
+ renderedId = attrFormId + ":renderedId";
+ }
+ /**
+ * component with rendered = false is not present on the page
+ */
+ @Test
+ public void testRendered(Template template) {
+ init(template);
+ Assert.assertTrue(selenium.isElementPresent(lsId), "ListShuttle must be rendered.");
+ selenium.click(renderedId);
+ waitForAjaxCompletion();
+ clickAjaxCommandAndWait(submitId);
+
+ Assert.assertFalse(selenium.isElementPresent(lsId), "ListShuttle mustn't be rendered.");
+ }
+
+ /**
+ * JS API is present and works
+ */
+ // @Test
+ public void testJSAPI(Template template) {
+ //TODO JS API has some bugs. This test case should be completed after fixing theirs.
+ init(template);
+ selenium.runScript("var listShuttle = ($('" + lsId + "')).component;");
+ // Check count
+ _assertTableRowsCount(availebleListId, 5);
+ _assertTableRowsCount(targetListId, 0);
+ // Copy all and check count
+ try {
+ selenium.runScript("listShuttle.copyAll();");
+ _assertTableRowsCount(availebleListId, 0);
+ _assertTableRowsCount(targetListId, 5);
+ } catch (Exception e) {
+ writeStatus("Test failed. Copy all does not work. Cause: " + e, true);
+ Assert.fail("Test failed. Copy all does not work. Cause: " + e);
+ }
+ // Remove all and check count
+ try {
+ selenium.runScript("listShuttle.removeAll();");
+ _assertTableRowsCount(availebleListId, 5);
+ _assertTableRowsCount(targetListId, 0);
+ } catch (Exception e) {
+ writeStatus("Test failed. Remove all does not work. Cause: " + e, true);
+ Assert.fail("Test failed. Remove all does not work. Cause: " + e);
+ }
+
+ try {
+ // Copy 1st & 2nd item
+ _selectItem(parentId + "ls:0");
+ selenium.runScript("listShuttle.copy();");
+ _selectItem(parentId + "ls:1");
+ selenium.runScript("listShuttle.copy();");
+ _selectItem(parentId + "ls:2");
+ selenium.runScript("listShuttle.copy();");
+ // Check count
+ _assertTableRowsCount(availebleListId, 2);
+ _assertTableRowsCount(targetListId, 3);
+ } catch (Exception e) {
+ writeStatus("Test failed. Copy does not work. Cause: " + e, true);
+ Assert.fail("Test failed. Copy does not work. cause: " + e);
+ }
+
+ // Check posting to server
+ _checkDataPost2Server(2, 3);
+
+ // Check ordering
+ _checkOrdering(targetListId, "1Item1", "2Item2", "3Item3", "");
+
+ // Move the first to to the last
+ _selectItem(parentId + "ls:t0");
+ selenium.runScript("listShuttle.down();");
+ _checkOrdering(targetListId, "2Item2", "1Item1", "3Item3", "Test failed. Down control does not work");
+
+ _selectItem(parentId + "ls:t0");
+ selenium.runScript("listShuttle.bottom();");
+ _checkOrdering(targetListId, "2Item2", "3Item3", "1Item1", "Test failed. Last control does not work");
+
+ _selectItem(parentId + "ls:t2");
+ selenium.runScript("listShuttle.top();");
+ _checkOrdering(targetListId, "3Item3", "2Item2", "1Item1", "Test failed. First control does not work");
+
+ _selectItem(parentId + "ls:t0");
+ selenium.runScript("listShuttle.up();");
+ _checkOrdering(targetListId, "3Item3", "1Item1", "2Item2", "Test failed. Up control does not work");
+
+ _selectItem(parentId + "ls:t1");
+ selenium.runScript("listShuttle.remove();");
+ _checkOrdering(targetListId, "3Item3", "1Item1", null, "Test failed. Remove control does not work");
+
+ _assertTableRowsCount(targetListId, 2);
+ }
+
/**
* Check 'switchByClick' attribute
*/
16 years, 11 months
JBoss Rich Faces SVN: r10746 - trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-10-14 10:39:36 -0400 (Tue, 14 Oct 2008)
New Revision: 10746
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
Log:
Add assert if page was not rendered
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-14 14:32:10 UTC (rev 10745)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-14 14:39:36 UTC (rev 10746)
@@ -237,6 +237,10 @@
private void reset() {
+ if (base.getParentId() == null) {
+ Assert.fail("Page has not been rendered before test. Invoke 'renderPage' method before !");
+ }
+
for (TestSetupEntry attr : TestSetupEntry.list) {
setupControl(attr, attr.defaultValue);
}
16 years, 11 months
JBoss Rich Faces SVN: r10745 - in trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces: testng and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-10-14 10:32:10 -0400 (Tue, 14 Oct 2008)
New Revision: 10745
Modified:
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
Log:
Ajax Command Link: ajax attributes test
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-14 14:21:20 UTC (rev 10744)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/AutoTester.java 2008-10-14 14:32:10 UTC (rev 10745)
@@ -198,9 +198,13 @@
}
private void checkComponentReRendered() {
+ if (base.getReRendersId() == null) {
+ return;
+ }
+
List<String> htmlBefore = new ArrayList<String>();
List<String> htmlAfter = new ArrayList<String>();
-
+
for (String id : base.getReRendersId()) {
htmlBefore.add(base.getHTMLById(getClientId(id)));
}
Modified: trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java
===================================================================
--- trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-10-14 14:21:20 UTC (rev 10744)
+++ trunk/test-applications/seleniumTest/richfaces/src/test/java/org/richfaces/testng/AjaxCommandLinkTest.java 2008-10-14 14:32:10 UTC (rev 10745)
@@ -20,6 +20,34 @@
}
@Test
+ public void testReRender(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ tester.testReRender();
+ }
+
+ @Test
+ public void testBypassUpdates(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ tester.testBypassUpdate();
+ }
+
+ @Test
+ public void testLimitToList(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ tester.testLimitToList();
+ }
+
+ @Test
+ public void testRendered(Template template) {
+ AutoTester tester = getAutoTester(this);
+ tester.renderPage(template, null);
+ tester.testRendered();
+ }
+
+ @Test
public void testNestedParams (Template template) {
AutoTester tester = getAutoTester(this);
tester.renderPage(template, null);
16 years, 11 months