Author: amarkhel
Date: 2008-07-04 09:48:25 -0400 (Fri, 04 Jul 2008)
New Revision: 9418
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/message/
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxHTMLCommandLink/
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml
trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
Log:
Add selenium test for components a4j:htmlCommandLink and a4j:loadBundle
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java 2008-07-04
00:40:00 UTC (rev 9417)
+++
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/A4JCommandTestBean.java 2008-07-04
13:48:25 UTC (rev 9418)
@@ -15,6 +15,8 @@
private String value;
+ private boolean rendered = true;
+
private AjaxContext getAjaxContext () {
FacesContext context = FacesContextImpl.getCurrentInstance();
if (context != null) {
@@ -60,6 +62,20 @@
put2ResponseData("input", true);
}
+ public boolean isRendered() {
+ return rendered;
+ }
+ public String reRender(){
+ this.setRendered(!rendered);
+ return null;
+ }
+ /**
+ * @param value the value to set
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
}
Modified:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java
===================================================================
---
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-07-04
00:40:00 UTC (rev 9417)
+++
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/IndexBean.java 2008-07-04
13:48:25 UTC (rev 9418)
@@ -53,6 +53,7 @@
public IndexBean() {
list.add(new ComponentItem("<a4j:commandButton>",
"ajaxCommandButton/ajaxButtonTest.xhtml"));
list.add(new ComponentItem("<a4j:commandLink>",
"ajaxCommandLink/ajaxLinkTest.xhtml"));
+ list.add(new ComponentItem("<a4j:htmlCommandLink>",
"ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml"));
list.add(new ComponentItem("<a4j:poll>",
"ajaxPoll/ajaxPollTest.xhtml"));
list.add(new ComponentItem("<a4j:region>",
"ajaxRegion/ajaxRegionTest.xhtml"));
list.add(new ComponentItem("<rich:calendar>",
"calendar/calendarTest.xhtml"));
@@ -80,6 +81,7 @@
list.add(new ComponentItem("<a4j:support>",
"ajaxOutputPanel/ajaxOutputPanelTest.xhtml"));
list.add(new ComponentItem("<a4j:jsFunction>",
"jsFunction/jsFunctionTest.xhtml"));
list.add(new ComponentItem("<rich:spacer>",
"spacer/spacerTest.xhtml"));
+ list.add(new ComponentItem("<a4j:loadBundle>",
"loadBundle/loadBundle.xhtml"));
sortList();
Added:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
===================================================================
---
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
(rev 0)
+++
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java 2008-07-04
13:48:25 UTC (rev 9418)
@@ -0,0 +1,23 @@
+package org.ajax4jsf.bean;
+
+
+public class LoadBundleTestBean {
+
+ private boolean rendered = false;
+
+ public boolean isRendered() {
+ return rendered;
+ }
+
+ public void reRender(){
+ this.setRendered(!rendered);
+ }
+
+ /**
+ * @param value the value to set
+ */
+ public void setRendered(boolean rendered) {
+ this.rendered = rendered;
+ }
+
+}
Property changes on:
trunk/test-applications/seleniumTest/src/main/java/org/ajax4jsf/bean/LoadBundleTestBean.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Id Revision Date
Name: svn:eol-style
+ native
Added:
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
===================================================================
---
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
(rev 0)
+++
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/message/resources_en_US.properties 2008-07-04
13:48:25 UTC (rev 9418)
@@ -0,0 +1,2 @@
+test=It is sample message from resourceBundle
+error=Error was occured.
\ No newline at end of file
Property changes on:
trunk/test-applications/seleniumTest/src/main/resources/org/ajax4jsf/message/resources_en_US.properties
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:eol-style
+ native
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-07-04
00:40:00 UTC (rev 9417)
+++
trunk/test-applications/seleniumTest/src/main/webapp/WEB-INF/faces-config.xml 2008-07-04
13:48:25 UTC (rev 9418)
@@ -6,7 +6,10 @@
<faces-config>
<application>
- <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ <view-handler>com.sun.facelets.FaceletViewHandler</view-handler>
+ <message-bundle>
+ org.ajax4jsf.message.resources
+ </message-bundle>
</application>
<managed-bean>
@@ -175,6 +178,11 @@
<managed-bean-class>org.ajax4jsf.bean.AjaxPushTestBean</managed-bean-class>
<managed-bean-scope>session</managed-bean-scope>
</managed-bean>
+ <managed-bean>
+ <managed-bean-name>loadBundleBean</managed-bean-name>
+ <managed-bean-class>org.ajax4jsf.bean.LoadBundleTestBean</managed-bean-class>
+ <managed-bean-scope>request</managed-bean-scope>
+ </managed-bean>
<navigation-rule>
<from-view-id>/pages/ajaxInclude/step1.xhtml</from-view-id>
<navigation-case>
@@ -188,5 +196,5 @@
<from-outcome>previous</from-outcome>
<to-view-id>/pages/ajaxInclude/step1.xhtml</to-view-id>
</navigation-case>
- </navigation-rule>
+ </navigation-rule>
</faces-config>
\ No newline at end of file
Modified: trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml
===================================================================
--- trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-07-04
00:40:00 UTC (rev 9417)
+++ trunk/test-applications/seleniumTest/src/main/webapp/layout/layout.xhtml 2008-07-04
13:48:25 UTC (rev 9418)
@@ -8,6 +8,7 @@
<f:view contentType="text/html">
<head>
<a4j:loadScript
src="resource:///org/ajax4jsf/javascript/scripts/AJAX.js"></a4j:loadScript>
+ <a4j:loadScript
src="resource:///org/ajax4jsf/javascript/scripts/form.js"></a4j:loadScript>
<script>
var errorMessage = null;
var pauseHolder = {};
Added:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml
===================================================================
(Binary files differ)
Property changes on:
trunk/test-applications/seleniumTest/src/main/webapp/pages/ajaxHTMLCommandLink/ajaxHTMLLinkTest.xhtml
___________________________________________________________________
Name: svn:mime-type
+ application/xhtml+xml