Author: andrei_exadel
Date: 2008-04-09 06:52:03 -0400 (Wed, 09 Apr 2008)
New Revision: 7688
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JCommandTestBean.java
trunk/test-applications/seleniumTest/src/main/webapp/pages/
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommands.xhtml
trunk/test-applications/seleniumTest/src/test/org/
trunk/test-applications/seleniumTest/src/test/org/richfaces/
Removed:
trunk/test-applications/seleniumTest/src/test/java/
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml
Log:
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JCommandTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JCommandTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/A4JCommandTestBean.java 2008-04-09
10:52:03 UTC (rev 7688)
@@ -0,0 +1,56 @@
+package org.ajax4jsf;
+
+import java.util.Date;
+
+import javax.faces.event.ActionEvent;
+
+public class A4JCommandTestBean {
+
+ private Integer text = 1;
+
+ private String param;
+
+
+ public void actionListener(ActionEvent event) {
+ this.text++;
+ }
+
+ public String action () {
+ this.text++;
+ return null;
+ }
+
+ public String getDate() {
+ return String.valueOf(new Date().getTime());
+ }
+
+ /**
+ * @return the text
+ */
+ public Integer getText() {
+ return text;
+ }
+
+ /**
+ * @param text the text to set
+ */
+ public void setText(Integer text) {
+ text++;
+ this.text = text;
+ }
+
+ /**
+ * @return the param
+ */
+ public String getParam() {
+ return param;
+ }
+
+ /**
+ * @param param the param to set
+ */
+ public void setParam(String param) {
+ this.param = param;
+ }
+
+}
Modified:
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-04-09
10:29:33 UTC (rev 7687)
+++
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/.faces-config.xml.jsfdia 2008-04-09
10:52:03 UTC (rev 7688)
@@ -1,2 +1,2 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<PROCESS ENTITY="JSFProcess"/>
+<?xml version="1.0" encoding="UTF-8"?>
+<PROCESS ENTITY="JSFProcess"/>
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
---
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-09
10:29:33 UTC (rev 7687)
+++
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-04-09
10:52:03 UTC (rev 7688)
@@ -18,6 +18,13 @@
<property-class>java.lang.String</property-class>
<null-value />
</managed-property>
+ </managed-bean>
+
+
+ <managed-bean>
+ <managed-bean-name>commandBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.A4JCommandTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
</managed-bean>
</faces-config>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml 2008-04-09
10:29:33 UTC (rev 7687)
+++ trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/web.xml 2008-04-09
10:52:03 UTC (rev 7688)
@@ -37,14 +37,14 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
- <context-param>
+ <!-- context-param>
<param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
<param-value>NONE,TIDY,NEKO</param-value>
</context-param>
<context-param>
<param-name>org.ajax4jsf.xmlparser.TIDY</param-name>
<param-value>
- /pages/repeater.xhtml,/pages/tabs.xhtml
+ /pages/*
</param-value>
</context-param>
<context-param>
@@ -52,7 +52,7 @@
<param-value>
/pages/layout.xhtml
</param-value>
- </context-param>
+ </context-param-->
<!--
<context-param>
<param-name>org.ajax4jsf.SKIN</param-name>
Added: trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommands.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommands.xhtml
(rev 0)
+++
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxCommands.xhtml 2008-04-09
10:52:03 UTC (rev 7688)
@@ -0,0 +1,52 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core">
+ <head><title>test</title></head>
+ <body>
+ <a4j:status startText="Ajax in progress..." stopText="Ajax
completed" id="status"></a4j:status>
+ <h:form id="fff">
+ <a4j:commandButton
+ actionListener="#{commandBean.actionListener}"
+ reRender="date,text"
+ value="Button1"
+ id="b1" />
+ <a4j:commandLink
+ actionListener="#{commandBean.actionListener}"
+ ajaxSingle="true"
+ reRender="date,text"
+ value="Link1"
+ id="l1"></a4j:commandLink> <br/>
+ <h:inputText value="#{commandBean.text}" id="text"
style="width: 100px"/>
+ <h:panelGrid id="panel">
+ <a4j:commandButton
+ requestDelay="1000"
+ actionListener="#{commandBean.actionListener}"
+ reRender="date,text,param"
+ ajaxSingle="true"
+ value="Button2"
+ action="#{commandBean.action}"
+ id="b2">
+ <a4j:actionparam name="param" value="actionParameter1"
assignTo="#{commandBean.param}" />
+ </a4j:commandButton>
+ <a4j:commandLink
+ requestDelay="1000"
+ actionListener="#{commandBean.actionListener}"
+ action="#{commandBean.action}"
+ reRender="date,text,param"
+ value="Link2"
+ id="l2">
+ <a4j:actionparam name="param" value="actionParameter2"
assignTo="#{commandBean.param}" />
+ </a4j:commandLink> <br/>
+ </h:panelGrid>
+ <h:outputText value="#{commandBean.date}" id="date"/>
+ </h:form>
+ <h:form id="_form">
+ <h:outputText value="#{commandBean.param}"
id="param"></h:outputText>
+ </h:form>
+ <script type="text/javascript">
+ window.done=false;A4J.AJAX.AddListener(new
A4J.AJAX.Listener(function(){window.done=true}));
+ </script>
+ </body>
+</html>
\ No newline at end of file