JBoss Rich Faces SVN: r9018 - in branches/3.1.x/test-applications/facelets/src/main: webapp/DataOrderedList and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-12 08:40:57 -0400 (Thu, 12 Jun 2008)
New Revision: 9018
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/dataOrderedList/DataOrderedList.java
branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedList.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedListProperty.xhtml
Log:
Add binding and change used data for DataOrderedList
Modified: branches/3.1.x/test-applications/facelets/src/main/java/dataOrderedList/DataOrderedList.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/dataOrderedList/DataOrderedList.java 2008-06-12 12:26:53 UTC (rev 9017)
+++ branches/3.1.x/test-applications/facelets/src/main/java/dataOrderedList/DataOrderedList.java 2008-06-12 12:40:57 UTC (rev 9018)
@@ -1,7 +1,13 @@
package dataOrderedList;
import java.util.ArrayList;
+import java.util.Random;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.html.HtmlDataOrderedList;
+
import util.data.Data;
public class DataOrderedList
@@ -14,7 +20,33 @@
private String type;
private String dir;
private int mSize;
+ private HtmlDataOrderedList myDataOrderedList;
+ private String bindLabel;
+ public void bindingCheck(ActionEvent actionEvent){
+ FacesContext faces = FacesContext.getCurrentInstance();
+ bindLabel = myDataOrderedList.getBaseClientId(faces);
+ System.out.println("============LS Binding Check===========");
+ System.out.println(myDataOrderedList.getBaseClientId(faces));
+ System.out.println("============LS Binding Check===========");
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlDataOrderedList getMyDataOrderedList() {
+ return myDataOrderedList;
+ }
+
+ public void setMyDataOrderedList(HtmlDataOrderedList myDataOrderedList) {
+ this.myDataOrderedList = myDataOrderedList;
+ }
+
public String getDir() {
return dir;
}
@@ -44,8 +76,10 @@
rendered = true;
title = "title";
type = "1";
- for(int i = 1; i < Data.cityAfrica.length; i++)
- arr.add(new Data(Data.cityAfrica[i]));
+ Random randomGenerator = new Random();
+ for(int i = 0; i < Data.cars.length; i++)
+ arr.add(new Data(Data.cars[i], randomGenerator.nextInt(1000000), randomGenerator.nextInt(1000000)));
+ this.bindLabel = "Not checked";
}
public int getFirst() {
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedList.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedList.xhtml 2008-06-12 12:26:53 UTC (rev 9017)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedList.xhtml 2008-06-12 12:40:57 UTC (rev 9018)
@@ -1,14 +1,20 @@
<f:subview xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="dataOrderedListSubviewID">
- <rich:dataOrderedList id="doListID" value="#{dataOrderedList.arr}" var="arr" first="#{dataOrderedList.first}"
- rendered="#{dataOrderedList.rendered}" title="#{dataOrderedList.title}" type="#{dataOrderedList.type}" dir="#{dataOrderedList.dir}"
- rows="#{dataOrderedList.rows}">
- <f:facet name="header">
- <h:outputText value="Africa(header):" />
- </f:facet>
- <h:outputText value="#{arr.str0}" />
- <f:facet name="footer">
- <h:outputText value="Africa(footer);" />
- </f:facet>
+ <rich:dataOrderedList id="dataOrderedListID"
+ value="#{dataOrderedList.arr}" var="arr"
+ first="#{dataOrderedList.first}"
+ rendered="#{dataOrderedList.rendered}"
+ title="#{dataOrderedList.title}"
+ type="#{dataOrderedList.type}"
+ dir="#{dataOrderedList.dir}"
+ rows="#{dataOrderedList.rows}"
+ binding="#{dataOrderedList.myDataOrderedList}">
+
+ <h:outputText value="#{arr.str0} " /><f:verbatim><br /></f:verbatim>
+ <h:outputText value="Price: $" styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int0} " /><f:verbatim><br /></f:verbatim>
+ <h:outputText value="Mileage: " styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int1} " />
+ <h:outputText value=" Miles" />
</rich:dataOrderedList>
</f:subview>
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedListProperty.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedListProperty.xhtml 2008-06-12 12:26:53 UTC (rev 9017)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/DataOrderedList/DataOrderedListProperty.xhtml 2008-06-12 12:40:57 UTC (rev 9018)
@@ -1,26 +1,31 @@
<f:subview xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="dataOrderedListPropertySubviewID">
<h:panelGrid columns="2">
+ <a4j:commandButton reRender="outBindingCheck"
+ actionListener="#{dataOrderedList.bindingCheck}"
+ value="binding Check" />
+ <h:outputText id="outBindingCheck" value="#{dataOrderedList.bindLabel}" />
+
<h:outputText value="title" />
<h:inputText value="#{dataOrderedList.title}" >
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:inputText>
<h:outputText value="first" />
<h:inputText value="#{dataOrderedList.first}" >
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:inputText>
<h:outputText value="rows" />
<h:inputText value="#{dataOrderedList.rows}" >
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:inputText>
<h:outputText value="dir" />
<h:selectOneRadio value="#{dataOrderedList.dir}">
<f:selectItem itemValue="LTR" itemLabel="LTR"/>
<f:selectItem itemValue="RTL" itemLabel="RTL"/>
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="type" />
@@ -33,7 +38,7 @@
<f:selectItem itemValue="disc" itemLabel="disc"/>
<f:selectItem itemValue="circle" itemLabel="circle"/>
<f:selectItem itemValue="square" itemLabel="square"/>
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:selectOneMenu>
<h:outputText value="rendered" />
16 years
JBoss Rich Faces SVN: r9017 - in branches/3.1.x/test-applications/jsp/src/main: webapp/DataOrderedList and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-12 08:26:53 -0400 (Thu, 12 Jun 2008)
New Revision: 9017
Modified:
branches/3.1.x/test-applications/jsp/src/main/java/dataOrderedList/DataOrderedList.java
branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedList.jsp
branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedListProperty.jsp
Log:
Add binding and change used data for DataOrderedList
Modified: branches/3.1.x/test-applications/jsp/src/main/java/dataOrderedList/DataOrderedList.java
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/java/dataOrderedList/DataOrderedList.java 2008-06-12 11:07:13 UTC (rev 9016)
+++ branches/3.1.x/test-applications/jsp/src/main/java/dataOrderedList/DataOrderedList.java 2008-06-12 12:26:53 UTC (rev 9017)
@@ -1,7 +1,13 @@
package dataOrderedList;
import java.util.ArrayList;
+import java.util.Random;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+
+import org.richfaces.component.html.HtmlDataOrderedList;
+
import util.data.Data;
public class DataOrderedList
@@ -14,7 +20,33 @@
private String type;
private String dir;
private int mSize;
+ private HtmlDataOrderedList myDataOrderedList;
+ private String bindLabel;
+ public void bindingCheck(ActionEvent actionEvent){
+ FacesContext faces = FacesContext.getCurrentInstance();
+ bindLabel = myDataOrderedList.getBaseClientId(faces);
+ System.out.println("============LS Binding Check===========");
+ System.out.println(myDataOrderedList.getBaseClientId(faces));
+ System.out.println("============LS Binding Check===========");
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlDataOrderedList getMyDataOrderedList() {
+ return myDataOrderedList;
+ }
+
+ public void setMyDataOrderedList(HtmlDataOrderedList myDataOrderedList) {
+ this.myDataOrderedList = myDataOrderedList;
+ }
+
public String getDir() {
return dir;
}
@@ -44,8 +76,10 @@
rendered = true;
title = "title";
type = "1";
- for(int i = 1; i < Data.cityAfrica.length; i++)
- arr.add(new Data(Data.cityAfrica[i]));
+ Random randomGenerator = new Random();
+ for(int i = 0; i < Data.cars.length; i++)
+ arr.add(new Data(Data.cars[i], randomGenerator.nextInt(1000000), randomGenerator.nextInt(1000000)));
+ this.bindLabel = "Not checked";
}
public int getFirst() {
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedList.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedList.jsp 2008-06-12 11:07:13 UTC (rev 9016)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedList.jsp 2008-06-12 12:26:53 UTC (rev 9017)
@@ -4,15 +4,21 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="dataOrderedListSubviewID">
- <rich:dataOrderedList id="doListID" value="#{dataOrderedList.arr}" var="arr" first="#{dataOrderedList.first}"
- rendered="#{dataOrderedList.rendered}" title="#{dataOrderedList.title}" type="#{dataOrderedList.type}" dir="#{dataOrderedList.dir}"
- rows="#{dataOrderedList.rows}">
- <f:facet name="header">
- <h:outputText value="Africa(header):" />
- </f:facet>
- <h:outputText value="#{arr.str0}" />
- <f:facet name="footer">
- <h:outputText value="Africa(footer);" />
- </f:facet>
+ <rich:dataOrderedList id="dataOrderedListID"
+ value="#{dataOrderedList.arr}" var="arr"
+ first="#{dataOrderedList.first}"
+ rendered="#{dataOrderedList.rendered}"
+ title="#{dataOrderedList.title}"
+ type="#{dataOrderedList.type}"
+ dir="#{dataOrderedList.dir}"
+ rows="#{dataOrderedList.rows}"
+ binding="#{dataOrderedList.myDataOrderedList}">
+
+ <h:outputText value="#{arr.str0} " /><f:verbatim><br /></f:verbatim>
+ <h:outputText value="Price: $" styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int0} " /><f:verbatim><br /></f:verbatim>
+ <h:outputText value="Mileage: " styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int1} " />
+ <h:outputText value=" Miles" />
</rich:dataOrderedList>
</f:subview>
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedListProperty.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedListProperty.jsp 2008-06-12 11:07:13 UTC (rev 9016)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/DataOrderedList/DataOrderedListProperty.jsp 2008-06-12 12:26:53 UTC (rev 9017)
@@ -5,26 +5,31 @@
<f:subview id="dataOrderedListPropertySubviewID">
<h:panelGrid columns="2">
+ <a4j:commandButton reRender="outBindingCheck"
+ actionListener="#{dataOrderedList.bindingCheck}"
+ value="binding Check" />
+ <h:outputText id="outBindingCheck" value="#{dataOrderedList.bindLabel}" />
+
<h:outputText value="title" />
<h:inputText value="#{dataOrderedList.title}" >
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:inputText>
<h:outputText value="first" />
<h:inputText value="#{dataOrderedList.first}" >
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:inputText>
<h:outputText value="rows" />
<h:inputText value="#{dataOrderedList.rows}" >
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:inputText>
<h:outputText value="dir" />
<h:selectOneRadio value="#{dataOrderedList.dir}">
<f:selectItem itemValue="LTR" itemLabel="LTR"/>
<f:selectItem itemValue="RTL" itemLabel="RTL"/>
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="type" />
@@ -37,7 +42,7 @@
<f:selectItem itemValue="disc" itemLabel="disc"/>
<f:selectItem itemValue="circle" itemLabel="circle"/>
<f:selectItem itemValue="square" itemLabel="square"/>
- <a4j:support event="onchange" reRender="doListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataOrderedListID"></a4j:support>
</h:selectOneMenu>
<h:outputText value="rendered" />
16 years
JBoss Rich Faces SVN: r9016 - in branches/3.1.x/test-applications/jsp/src/main: java/util/data and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-12 07:07:13 -0400 (Thu, 12 Jun 2008)
New Revision: 9016
Modified:
branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java
branches/3.1.x/test-applications/jsp/src/main/java/util/data/Data.java
branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp
branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp
Log:
Change used data
Modified: branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 11:04:45 UTC (rev 9015)
+++ branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 11:07:13 UTC (rev 9016)
@@ -7,6 +7,7 @@
import org.richfaces.component.html.HtmlDataDefinitionList;
import util.data.Data;
+import java.util.Random;
public class DataDefinitionList
{
@@ -72,8 +73,9 @@
first = 0;
rendered = true;
title = "title";
- for(int i = 1; i < Data.cityAfrica.length; i++)
- arr.add(new Data(Data.cityAfrica[i]));
+ Random randomGenerator = new Random();
+ for(int i = 0; i < Data.cars.length; i++)
+ arr.add(new Data(Data.cars[i], randomGenerator.nextInt(1000000), randomGenerator.nextInt(1000000)));
this.bindLabel = "Not checked";
}
Modified: branches/3.1.x/test-applications/jsp/src/main/java/util/data/Data.java
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/java/util/data/Data.java 2008-06-12 11:04:45 UTC (rev 9015)
+++ branches/3.1.x/test-applications/jsp/src/main/java/util/data/Data.java 2008-06-12 11:07:13 UTC (rev 9016)
@@ -14,6 +14,7 @@
public static final String[] citySAmerica = {"South America","Argentina", "Bolivia", "Brazil", "Chile", "Colombia", "Easter Island", "Ecuador", "Falkland Islands", "French Guiana", "Guyana", "Paraguay", "Peru", "Suriname", "Uruguay", "Venezuela"};
public static final String[] citySEAsia = {"SouthEast Asia", "Ashmore and Cartier Islands", "Brunei", "Burma", "Cambodia", "Christmas Island", "Cocos (Keeling) Islands", "East Timor", "Hong Kong", "Indonesia", "Laos", "Malaysia", "Paracel Islands", "Philippines", "Singapore", "Spratly Islands", "Taiwan", "Thailand", "Vietnam"};
public static final String[] cityCaribbean = {"The Caribbean", "Anguilla", "Antigua and Barbuda", "Aruba", "Barbados", "British Virgin Islands", "Cayman Islands", "Cuba", "Dominica", "Dominican Republic", "Grenada", "Guadeloupe", "Haiti", "Jamaica", "Martinique", "Montserrat", "Navassa Island", "Netherlands Antilles", "Puerto Rico", "Saint Barthelemy", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "The Bahamas", "Trinidad and Tobago", "Turks and Caicos Islands", "Virgin Islands"};
+ public static final String[] cars = {"Mersedes E63AMG", "Audi RS6", "BMW M5", "Volvo S60R", "Ford Mondeo ST220", "Dodge Viper", "Shevrolet Corvett", "Jaguar XJ", "Bugatti Veyron"};
private String str0;
private String str1;
@@ -43,6 +44,12 @@
this.bool3 = false;
}
+ public Data(String str0, int int0, int int1){
+ this.str0 = str0;
+ this.int0 = int0;
+ this.int1 = int1;
+ }
+
public Data(String str0, String str1, String str2, String str3, int int0,
int int1, int int2, int int3, boolean bool0, boolean bool1,
boolean bool2, boolean bool3) {
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp 2008-06-12 11:04:45 UTC (rev 9015)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp 2008-06-12 11:07:13 UTC (rev 9016)
@@ -11,12 +11,14 @@
title="#{dataDefinitionList.title}" dir="#{dataDefinitionList.dir}"
rows="#{dataDefinitionList.rows}"
binding="#{dataDefinitionList.myDataDefinitionList}">
- <f:facet name="header">
- <h:outputText value="Africa(header):" />
- </f:facet>
- <h:outputText value="#{arr.str0}" />
- <f:facet name="footer">
- <h:outputText value="Africa(footer);" />
- </f:facet>
+
+ <f:facet name="term">
+ <h:outputText value="#{arr.str0}"></h:outputText>
+ </f:facet>
+ <h:outputText value="Price: $" styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int0} " /><f:verbatim><br /></f:verbatim>
+ <h:outputText value="Mileage: " styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int1} " />
+ <h:outputText value=" Miles" />
</rich:dataDefinitionList>
</f:subview>
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp 2008-06-12 11:04:45 UTC (rev 9015)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp 2008-06-12 11:07:13 UTC (rev 9016)
@@ -12,24 +12,24 @@
<h:outputText value="title" />
<h:inputText value="#{dataDefinitionList.title}" >
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:inputText>
<h:outputText value="first" />
<h:inputText value="#{dataDefinitionList.first}" >
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:inputText>
<h:outputText value="rows" />
<h:inputText value="#{dataDefinitionList.rows}" >
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:inputText>
<h:outputText value="dir" />
<h:selectOneRadio value="#{dataDefinitionList.dir}">
<f:selectItem itemValue="LTR" itemLabel="LTR"/>
<f:selectItem itemValue="RTL" itemLabel="RTL"/>
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="rendered" />
16 years
JBoss Rich Faces SVN: r9015 - in branches/3.1.x/test-applications/facelets/src/main: java/util/data and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-12 07:04:45 -0400 (Thu, 12 Jun 2008)
New Revision: 9015
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java
branches/3.1.x/test-applications/facelets/src/main/java/util/data/Data.java
branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml
Log:
Change used data
Modified: branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 09:18:41 UTC (rev 9014)
+++ branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 11:04:45 UTC (rev 9015)
@@ -1,6 +1,7 @@
package dataDefinitionList;
import java.util.ArrayList;
+import java.util.Random;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
@@ -72,8 +73,10 @@
first = 0;
rendered = true;
title = "title";
- for(int i = 1; i < Data.cityAfrica.length; i++)
- arr.add(new Data(Data.cityAfrica[i]));
+ Random randomGenerator = new Random();
+ for(int i = 0; i < Data.cars.length; i++)
+ arr.add(new Data(Data.cars[i], randomGenerator.nextInt(1000000), randomGenerator.nextInt(1000000)));
+ this.bindLabel = "Not checked";
}
public int getFirst() {
Modified: branches/3.1.x/test-applications/facelets/src/main/java/util/data/Data.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/util/data/Data.java 2008-06-12 09:18:41 UTC (rev 9014)
+++ branches/3.1.x/test-applications/facelets/src/main/java/util/data/Data.java 2008-06-12 11:04:45 UTC (rev 9015)
@@ -14,7 +14,8 @@
public static final String[] citySAmerica = {"South America","Argentina", "Bolivia", "Brazil", "Chile", "Colombia", "Easter Island", "Ecuador", "Falkland Islands", "French Guiana", "Guyana", "Paraguay", "Peru", "Suriname", "Uruguay", "Venezuela"};
public static final String[] citySEAsia = {"SouthEast Asia", "Ashmore and Cartier Islands", "Brunei", "Burma", "Cambodia", "Christmas Island", "Cocos (Keeling) Islands", "East Timor", "Hong Kong", "Indonesia", "Laos", "Malaysia", "Paracel Islands", "Philippines", "Singapore", "Spratly Islands", "Taiwan", "Thailand", "Vietnam"};
public static final String[] cityCaribbean = {"The Caribbean", "Anguilla", "Antigua and Barbuda", "Aruba", "Barbados", "British Virgin Islands", "Cayman Islands", "Cuba", "Dominica", "Dominican Republic", "Grenada", "Guadeloupe", "Haiti", "Jamaica", "Martinique", "Montserrat", "Navassa Island", "Netherlands Antilles", "Puerto Rico", "Saint Barthelemy", "Saint Kitts and Nevis", "Saint Lucia", "Saint Vincent and the Grenadines", "The Bahamas", "Trinidad and Tobago", "Turks and Caicos Islands", "Virgin Islands"};
-
+ public static final String[] cars = {"Mersedes E63AMG", "Audi RS6", "BMW M5", "Volvo S60R", "Ford Mondeo ST220", "Dodge Viper", "Shevrolet Corvett", "Jaguar XJ", "Bugatti Veyron"};
+
private String str0;
private String str1;
private String str2;
@@ -67,6 +68,12 @@
this.str3 = str3;
}
+ public Data(String str0, int int0, int int1){
+ this.str0 = str0;
+ this.int0 = int0;
+ this.int1 = int1;
+ }
+
public Data(int int0, String str0, String str1, String str2, String str3){
this.int0 = int0;
this.str0 = str0;
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml 2008-06-12 09:18:41 UTC (rev 9014)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml 2008-06-12 11:04:45 UTC (rev 9015)
@@ -7,12 +7,14 @@
title="#{dataDefinitionList.title}" dir="#{dataDefinitionList.dir}"
rows="#{dataDefinitionList.rows}"
binding="#{dataDefinitionList.myDataDefinitionList}">
- <f:facet name="header">
- <h:outputText value="Africa(header):" />
- </f:facet>
- <h:outputText value="#{arr.str0}" />
- <f:facet name="footer">
- <h:outputText value="Africa(footer);" />
- </f:facet>
+
+ <f:facet name="term">
+ <h:outputText value="#{arr.str0}"></h:outputText>
+ </f:facet>
+ <h:outputText value="Price: $" styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int0} " /><f:verbatim><br /></f:verbatim>
+ <h:outputText value="Mileage: " styleClass="label"></h:outputText>
+ <h:outputText value="#{arr.int1} " />
+ <h:outputText value=" Miles" />
</rich:dataDefinitionList>
</f:subview>
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml 2008-06-12 09:18:41 UTC (rev 9014)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml 2008-06-12 11:04:45 UTC (rev 9015)
@@ -8,24 +8,24 @@
<h:outputText value="title" />
<h:inputText value="#{dataDefinitionList.title}" >
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:inputText>
<h:outputText value="first" />
<h:inputText value="#{dataDefinitionList.first}" >
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:inputText>
<h:outputText value="rows" />
<h:inputText value="#{dataDefinitionList.rows}" >
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:inputText>
<h:outputText value="dir" />
<h:selectOneRadio value="#{dataDefinitionList.dir}">
<f:selectItem itemValue="LTR" itemLabel="LTR"/>
<f:selectItem itemValue="RTL" itemLabel="RTL"/>
- <a4j:support event="onchange" reRender="ddListID"></a4j:support>
+ <a4j:support event="onchange" reRender="dataDefinitionListID"></a4j:support>
</h:selectOneRadio>
<h:outputText value="rendered" />
16 years
JBoss Rich Faces SVN: r9014 - in branches/3.1.x/test-applications/jsp/src/main: webapp/DataDefinitionList and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-12 05:18:41 -0400 (Thu, 12 Jun 2008)
New Revision: 9014
Modified:
branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java
branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp
branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp
Log:
Add binding
Modified: branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 09:18:12 UTC (rev 9013)
+++ branches/3.1.x/test-applications/jsp/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 09:18:41 UTC (rev 9014)
@@ -2,6 +2,10 @@
import java.util.ArrayList;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import org.richfaces.component.html.HtmlDataDefinitionList;
+
import util.data.Data;
public class DataDefinitionList
@@ -13,7 +17,33 @@
private String title;
private String dir;
private int mSize;
+ private HtmlDataDefinitionList myDataDefinitionList;
+ private String bindLabel;
+ public void bindingCheck(ActionEvent actionEvent){
+ FacesContext faces = FacesContext.getCurrentInstance();
+ bindLabel = myDataDefinitionList.getBaseClientId(faces);
+ System.out.println("============LS Binding Check===========");
+ System.out.println(myDataDefinitionList.getBaseClientId(faces));
+ System.out.println("============LS Binding Check===========");
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlDataDefinitionList getMyDataDefinitionList() {
+ return myDataDefinitionList;
+ }
+
+ public void setMyDataDefinitionList(HtmlDataDefinitionList myDataDefinitionList) {
+ this.myDataDefinitionList = myDataDefinitionList;
+ }
+
public String getDir() {
return dir;
}
@@ -44,6 +74,7 @@
title = "title";
for(int i = 1; i < Data.cityAfrica.length; i++)
arr.add(new Data(Data.cityAfrica[i]));
+ this.bindLabel = "Not checked";
}
public int getFirst() {
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp 2008-06-12 09:18:12 UTC (rev 9013)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionList.jsp 2008-06-12 09:18:41 UTC (rev 9014)
@@ -4,9 +4,13 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="dataDefinitionListSubviewID">
- <rich:dataDefinitionList id="ddListID" value="#{dataDefinitionList.arr}" var="arr" first="#{dataDefinitionList.first}"
- rendered="#{dataDefinitionList.rendered}" title="#{dataDefinitionList.title}" dir="#{dataDefinitionList.dir}"
- rows="#{dataDefinitionList.rows}">
+ <rich:dataDefinitionList id="dataDefinitionListID"
+ value="#{dataDefinitionList.arr}" var="arr"
+ first="#{dataDefinitionList.first}"
+ rendered="#{dataDefinitionList.rendered}"
+ title="#{dataDefinitionList.title}" dir="#{dataDefinitionList.dir}"
+ rows="#{dataDefinitionList.rows}"
+ binding="#{dataDefinitionList.myDataDefinitionList}">
<f:facet name="header">
<h:outputText value="Africa(header):" />
</f:facet>
Modified: branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp
===================================================================
--- branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp 2008-06-12 09:18:12 UTC (rev 9013)
+++ branches/3.1.x/test-applications/jsp/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.jsp 2008-06-12 09:18:41 UTC (rev 9014)
@@ -5,6 +5,11 @@
<f:subview id="dataDefinitionListPropertySubviewID">
<h:panelGrid columns="2">
+ <a4j:commandButton reRender="outBindingCheck"
+ actionListener="#{dataDefinitionList.bindingCheck}"
+ value="binding Check" />
+ <h:outputText id="outBindingCheck" value="#{dataDefinitionList.bindLabel}" />
+
<h:outputText value="title" />
<h:inputText value="#{dataDefinitionList.title}" >
<a4j:support event="onchange" reRender="ddListID"></a4j:support>
16 years
JBoss Rich Faces SVN: r9013 - in branches/3.1.x/test-applications/facelets/src/main: webapp/DataDefinitionList and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-12 05:18:12 -0400 (Thu, 12 Jun 2008)
New Revision: 9013
Modified:
branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java
branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml
branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml
Log:
Add binding
Modified: branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 08:50:03 UTC (rev 9012)
+++ branches/3.1.x/test-applications/facelets/src/main/java/dataDefinitionList/DataDefinitionList.java 2008-06-12 09:18:12 UTC (rev 9013)
@@ -2,6 +2,10 @@
import java.util.ArrayList;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
+import org.richfaces.component.html.HtmlDataDefinitionList;
+
import util.data.Data;
public class DataDefinitionList
@@ -13,7 +17,33 @@
private String title;
private String dir;
private int mSize;
+ private HtmlDataDefinitionList myDataDefinitionList;
+ private String bindLabel;
+ public void bindingCheck(ActionEvent actionEvent){
+ FacesContext faces = FacesContext.getCurrentInstance();
+ bindLabel = myDataDefinitionList.getBaseClientId(faces);
+ System.out.println("============LS Binding Check===========");
+ System.out.println(myDataDefinitionList.getBaseClientId(faces));
+ System.out.println("============LS Binding Check===========");
+ }
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlDataDefinitionList getMyDataDefinitionList() {
+ return myDataDefinitionList;
+ }
+
+ public void setMyDataDefinitionList(HtmlDataDefinitionList myDataDefinitionList) {
+ this.myDataDefinitionList = myDataDefinitionList;
+ }
+
public String getDir() {
return dir;
}
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml 2008-06-12 08:50:03 UTC (rev 9012)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionList.xhtml 2008-06-12 09:18:12 UTC (rev 9013)
@@ -1,8 +1,12 @@
<f:subview xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="dataDefinitionListSubviewID">
- <rich:dataDefinitionList id="ddListID" value="#{dataDefinitionList.arr}" var="arr" first="#{dataDefinitionList.first}"
- rendered="#{dataDefinitionList.rendered}" title="#{dataDefinitionList.title}" dir="#{dataDefinitionList.dir}"
- rows="#{dataDefinitionList.rows}">
+ <rich:dataDefinitionList id="dataDefinitionListID"
+ value="#{dataDefinitionList.arr}"
+ var="arr" first="#{dataDefinitionList.first}"
+ rendered="#{dataDefinitionList.rendered}"
+ title="#{dataDefinitionList.title}" dir="#{dataDefinitionList.dir}"
+ rows="#{dataDefinitionList.rows}"
+ binding="#{dataDefinitionList.myDataDefinitionList}">
<f:facet name="header">
<h:outputText value="Africa(header):" />
</f:facet>
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml 2008-06-12 08:50:03 UTC (rev 9012)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/DataDefinitionList/DataDefinitionListProperty.xhtml 2008-06-12 09:18:12 UTC (rev 9013)
@@ -1,6 +1,11 @@
<f:subview xmlns:f="http://java.sun.com/jsf/core" xmlns:a4j="http://richfaces.org/a4j" xmlns:h="http://java.sun.com/jsf/html" xmlns:rich="http://richfaces.org/rich" id="dataDefinitionListPropertySubviewID">
<h:panelGrid columns="2">
+ <a4j:commandButton reRender="outBindingCheck"
+ actionListener="#{dataDefinitionList.bindingCheck}"
+ value="binding Check" />
+ <h:outputText id="outBindingCheck" value="#{dataDefinitionList.bindLabel}" />
+
<h:outputText value="title" />
<h:inputText value="#{dataDefinitionList.title}" >
<a4j:support event="onchange" reRender="ddListID"></a4j:support>
16 years
JBoss Rich Faces SVN: r9012 - in trunk/test-applications/seleniumTest/src/test: java/org/richfaces/testng and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-06-12 04:50:03 -0400 (Thu, 12 Jun 2008)
New Revision: 9012
Modified:
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml
Log:
refactoring
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-12 06:16:25 UTC (rev 9011)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/SeleniumTestBase.java 2008-06-12 08:50:03 UTC (rev 9012)
@@ -21,13 +21,20 @@
package org.richfaces;
+import java.util.ArrayList;
+import java.util.List;
+
import org.ajax4jsf.bean.Configurator;
import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.template.Template;
import org.openqa.selenium.server.SeleniumServer;
import org.testng.Assert;
import org.testng.annotations.AfterSuite;
+import org.testng.annotations.AfterTest;
import org.testng.annotations.BeforeSuite;
+import org.testng.annotations.BeforeTest;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Parameters;
import com.thoughtworks.selenium.DefaultSelenium;
@@ -37,7 +44,7 @@
* @author Andrey Markavtsov
*
*/
-public abstract class SeleniumTestBase {
+public abstract class SeleniumTestBase implements RichSeleniumTest {
/** Specifies the time to wait for page rendering */
private static final Integer pageRenderTime = 5000;
@@ -64,19 +71,19 @@
/** Protocol */
public String protocol;
- private String filterPrefix;
+ private String filterPrefix;
- private SeleniumServer seleniumServer;
+ private SeleniumServer seleniumServer;
+ private Object[][] data;
+
/** Defines the name of current j2ee application name */
public static final String APPLICATION_NAME = "seleniumTest";
- public static final String DATA_TABLE_TEMPLATE = "dataTable";
+ public SeleniumTestBase() {
+ this("http", "localhost", serverPort);
+ }
- public static final String MODAL_PANEL_TEMPLATE = "modalPanel";
-
- public static final String SIMPLE_TEMPLATE = "simple";
-
public SeleniumTestBase(String protocol, String host, String port) {
this.host = host;
this.port = port;
@@ -89,16 +96,62 @@
seleniumServer.start();
}
+ @DataProvider(name = "templates")
+ protected Object[][] templates() {
+ return new Object[][] { { Template.SIMPLE }, { Template.DATA_TABLE }, { Template.MODAL_PANEL } };
+ //return this.data;
+ }
+ /**
+ * This method are invoked before selenium tests started
+ */
+ @BeforeTest
+ @Parameters({"browser", "filterPrefix"})
+ public void startSelenium(String browser, String filterPrefix) {
+ synchronized (MUTEX) {
+ this.filterPrefix = filterPrefix;
+ selenium = createSeleniumClient(protocol + "://" + host + ":" + port + "/", browser);
+ selenium.start();
+ }
+ }
+
+ @BeforeTest
+ @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
+ protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy) throws Exception {
+ Configurator.setLoadScriptStrategy(loadScriptStrategy);
+ Configurator.setLoadStyleStrategy(loadStyleStrategy);
+ }
+
+ /**
+ * This method are invoked after selenium tests completed
+ */
+ @AfterTest(alwaysRun=true)
+ public void stopSelenium() {
+ synchronized (MUTEX) {
+ selenium.stop();
+ selenium = null;
+ }
+ }
+
+ protected void loadTemplates(String templateExpr) {
+ String[] array = new String[]{};
+ if(null != templateExpr) {
+ array = templateExpr.split(",");
+ }
+
+ List<Object[]> list = new ArrayList<Object[]>();
+ for (String string : array) {
+ Object[] elem = new Object[] {Template.valueOf(string)};
+ list.add(elem);
+ }
+
+ this.data = (Object[][]) list.toArray(new Object[0][0]);
+ }
+
@AfterSuite
public void stopSeleniumServer() throws Exception {
seleniumServer.stop();
}
-
- protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy) throws Exception {
- Configurator.setLoadScriptStrategy(loadScriptStrategy);
- Configurator.setLoadStyleStrategy(loadStyleStrategy);
- }
/**
* @param url
@@ -110,29 +163,8 @@
}
private static final Object MUTEX = new Object();
-
- /**
- * This method are invoking before selenium tests started
- */
- protected void startSelenium(String browser, String filterPrefix) {
- synchronized (MUTEX) {
- this.filterPrefix = filterPrefix;
- selenium = createSeleniumClient(protocol + "://" + host + ":" + port + "/", browser);
- selenium.start();
- }
- }
/**
- * This method are invoking after selenium tests completed
- */
- protected void stopSelenium() {
- synchronized (MUTEX) {
- selenium.stop();
- selenium = null;
- }
- }
-
- /**
* Renders page
*/
protected void renderPage(Template template) {
@@ -154,10 +186,9 @@
}
-
/**
* Writes status message on client side
- *
+ *
* @param message
*/
public void writeStatus(String message) {
@@ -658,8 +689,5 @@
*
* @return
*/
- protected String getTestUrl() {
- return null;
- }
-
+ public abstract String getTestUrl();
}
Modified: trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java
===================================================================
--- trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-06-12 06:16:25 UTC (rev 9011)
+++ trunk/test-applications/seleniumTest/src/test/java/org/richfaces/testng/AjaxCommandButtonTest.java 2008-06-12 08:50:03 UTC (rev 9012)
@@ -1,58 +1,19 @@
package org.richfaces.testng;
import org.ajax4jsf.template.Template;
-import org.richfaces.RichSeleniumTest;
import org.richfaces.SeleniumTestBase;
import org.testng.Assert;
-import org.testng.annotations.AfterMethod;
-import org.testng.annotations.BeforeMethod;
-import org.testng.annotations.Parameters;
import org.testng.annotations.Test;
-public class AjaxCommandButtonTest extends SeleniumTestBase implements RichSeleniumTest {
+public class AjaxCommandButtonTest extends SeleniumTestBase {
-
- public AjaxCommandButtonTest() {
- super("http", "localhost", serverPort);
- }
-
- /**
- * This method are invoking before selenium tests started
- */
- @BeforeMethod
- @Parameters({"browser", "filterPrefix"})
- public void startSelenium(String browser, String filterPrefix) {
- super.startSelenium(browser, filterPrefix);
- }
-
-
- @BeforeMethod
- @Parameters({"loadStyleStrategy", "loadScriptStrategy"})
- protected void loadConfiguration(String loadStyleStrategy, String loadScriptStrategy) throws Exception {
- super.loadConfiguration(loadStyleStrategy, loadScriptStrategy);
- }
-
- /**
- * This method are invoking after selenium tests completed
- */
- @AfterMethod(alwaysRun=true)
- public void stopSelenium() {
- super.stopSelenium();
- }
-
- @Test
- public void testAjaxCommandButtonComponent() throws Exception {
- _testAjaxCommandButtonComponent(Template.SIMPLE);
- _testAjaxCommandButtonComponent(Template.DATA_TABLE);
- _testAjaxCommandButtonComponent(Template.MODAL_PANEL);
- }
-
- private void _testAjaxCommandButtonComponent(Template template) {
+ @Test(dataProvider = "templates")
+ public void testAjaxCommandButtonComponent(Template template) {
renderPage(template);
-
+
String parentId = getParentId() + "_form:";
-
+
String buttonId = parentId + "b1";
boolean ajaxSingle = false;
boolean immediate = false;
@@ -92,10 +53,8 @@
waitForAjaxCompletion();
waitForOnCompleteHndler();
checkButton(buttonId, true, ajaxSingle, immediate, true, true, true, false);
-
-
}
-
+
private void setValidation(boolean success) {
StringBuffer buffer = new StringBuffer("setValidation(");
buffer.append(success);
@@ -127,11 +86,10 @@
if (result != null && result.length() > 0) {
Assert.fail("<a4j:commandButton> [ajaxSingle="+ajaxSingle+" ; immediate="+immediate+"] test failure caused by " + result);
}
-
}
- public String getTestUrl() {
- return "pages/ajaxCommandButton/ajaxButtonTest.xhtml";
- }
+ public String getTestUrl() {
+ return "pages/ajaxCommandButton/ajaxButtonTest.xhtml";
+ }
}
Modified: trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml
===================================================================
--- trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml 2008-06-12 06:16:25 UTC (rev 9011)
+++ trunk/test-applications/seleniumTest/src/test/testng/win/testng_default_default_neko.xml 2008-06-12 08:50:03 UTC (rev 9012)
@@ -1,21 +1,22 @@
-<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="seleniumTestDDNe">
- <test name="IEFunctionalTests">
- <parameter name="browser" value="*iexplore"/>
- <parameter name="loadStyleStrategy" value="DEFAULT"/>
- <parameter name="loadScriptStrategy" value="DEFAULT"/>
- <parameter name="filterPrefix" value="/faces/NEKO/"/>
- <packages>
- <package name="org.richfaces.testng" />
- </packages>
- </test>
- <test name="FireFoxFunctionalTestsDDNe">
- <parameter name="loadStyleStrategy" value="DEFAULT"/>
- <parameter name="loadScriptStrategy" value="DEFAULT"/>
- <parameter name="filterPrefix" value="/faces/NEKO/"/>
- <parameter name="browser" value="*firefox"/>
- <packages>
- <package name="org.richfaces.testng" />
- </packages>
- </test>
+ <parameter name="templates" value="SIMPLE,DATA_TABLE,MODAL_PANEL" />
+ <test name="IEFunctionalTests">
+ <parameter name="browser" value="*iexplore" />
+ <parameter name="loadStyleStrategy" value="DEFAULT" />
+ <parameter name="loadScriptStrategy" value="DEFAULT" />
+ <parameter name="filterPrefix" value="/faces/NEKO/" />
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
+ <test name="FireFoxFunctionalTestsDDNe">
+ <parameter name="browser" value="*firefox" />
+ <parameter name="loadStyleStrategy" value="DEFAULT" />
+ <parameter name="loadScriptStrategy" value="DEFAULT" />
+ <parameter name="filterPrefix" value="/faces/NEKO/" />
+ <packages>
+ <package name="org.richfaces.testng" />
+ </packages>
+ </test>
</suite>
16 years
JBoss Rich Faces SVN: r9011 - branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Action.
by richfaces-svn-commits@lists.jboss.org
Author: adubovsky
Date: 2008-06-12 02:16:25 -0400 (Thu, 12 Jun 2008)
New Revision: 9011
Modified:
branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Action/EventInfo.xhtml
Log:
add new event
Modified: branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Action/EventInfo.xhtml
===================================================================
--- branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Action/EventInfo.xhtml 2008-06-11 20:03:25 UTC (rev 9010)
+++ branches/3.1.x/test-applications/facelets/src/main/webapp/pages/Action/EventInfo.xhtml 2008-06-12 06:16:25 UTC (rev 9011)
@@ -58,5 +58,7 @@
<div style="position: relative"><input id="oncopyclickInputID" type="hidden" value="don't work!" size="42" /></div>
<div style="position: relative"><input id="onremoveallclickInputID" type="hidden" value="don't work!" size="42" /></div>
<div style="position: relative"><input id="onremoveclickInputID" type="hidden" value="don't work!" size="42" /></div>
+ <div style="position: relative"><input id="onmouseoverInputID" type="hidden" value="don't work!" size="42" /></div>
+
</f:verbatim>
</f:subview>
16 years
JBoss Rich Faces SVN: r9010 - in trunk/sandbox: ui/hotKey and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2008-06-11 16:03:25 -0400 (Wed, 11 Jun 2008)
New Revision: 9010
Modified:
trunk/sandbox/samples/hotKey-sample/
trunk/sandbox/ui/hotKey/
Log:
Property changes on: trunk/sandbox/samples/hotKey-sample
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
.settings
target
Property changes on: trunk/sandbox/ui/hotKey
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
.settings
target
16 years
JBoss Rich Faces SVN: r9009 - in trunk/sandbox: ui/hotKey/src/main/config/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: SergeySmirnov
Date: 2008-06-11 15:59:38 -0400 (Wed, 11 Jun 2008)
New Revision: 9009
Modified:
trunk/sandbox/samples/hotKey-sample/src/main/webapp/pages/index.jsp
trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml
trunk/sandbox/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/hotKey.js
trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx
Log:
operation attribute is removed. Boolean for boolean is added
Modified: trunk/sandbox/samples/hotKey-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/hotKey-sample/src/main/webapp/pages/index.jsp 2008-06-11 17:49:45 UTC (rev 9008)
+++ trunk/sandbox/samples/hotKey-sample/src/main/webapp/pages/index.jsp 2008-06-11 19:59:38 UTC (rev 9009)
@@ -8,13 +8,14 @@
</head>
<body>
<f:view>
- Alt-A is turned off and Alt-L is turned on just after whole page load (refresh)<br/>
+ Alt+A and Alt+L are turned on when page is loaded<br/>
<sb:hotKey id="me" key="alt+a" timing="immediate" handler="alert('alt+A is pressed')" />
- <sb:hotKey operation="remove" key="alt+a" timing="onload" />
<sb:hotKey id="you" key="alt+l" timing="immediate" handler="alert('alt+L is pressed')" />
<button onclick="${rich:component('me')}.invoke()">Turn Alt-A On</button>
+ <button onclick="${rich:component('me')}.remove()">Turn Alt-A Off</button>
+ <button onclick="${rich:component('you')}.invoke()">Turn Alt-L On</button>
<button onclick="${rich:component('you')}.remove()">Turn Alt-L Off</button>
</f:view>
Modified: trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml
===================================================================
--- trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml 2008-06-11 17:49:45 UTC (rev 9008)
+++ trunk/sandbox/ui/hotKey/src/main/config/component/hotKey.xml 2008-06-11 19:59:38 UTC (rev 9009)
@@ -36,13 +36,6 @@
<defaultvalue>""</defaultvalue>
</property>
<property>
- <name>operation</name>
- <classname>java.lang.String</classname>
- <description>
- </description>
- <defaultvalue>"add"</defaultvalue>
- </property>
- <property>
<name>timing</name>
<classname>java.lang.String</classname>
<description>
@@ -65,24 +58,21 @@
</property>
<property>
<name>propagete</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Boolean</classname>
<description>
</description>
- <defaultvalue>""</defaultvalue>
</property>
<property>
<name>disableInInput</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Boolean</classname>
<description>
</description>
- <defaultvalue>""</defaultvalue>
</property>
<property>
<name>checkParent</name>
- <classname>java.lang.String</classname>
+ <classname>java.lang.Boolean</classname>
<description>
</description>
- <defaultvalue>""</defaultvalue>
</property>
<property>
<name>handler</name>
Modified: trunk/sandbox/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/hotKey.js
===================================================================
--- trunk/sandbox/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/hotKey.js 2008-06-11 17:49:45 UTC (rev 9008)
+++ trunk/sandbox/ui/hotKey/src/main/resources/org/richfaces/renderkit/html/scripts/hotKey.js 2008-06-11 19:59:38 UTC (rev 9009)
@@ -9,10 +9,7 @@
document.getElementById(id).component = this;
this.invoke = function() {
- if ("add" == this.options.operation)
this.add(this.key, this.options, this.handler);
- else if ("remove" == this.options.operation)
- this.remove(this.key, this.options);
}
this.destroy = function() {
this.element.component = null;
Modified: trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx
===================================================================
--- trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx 2008-06-11 17:49:45 UTC (rev 9008)
+++ trunk/sandbox/ui/hotKey/src/main/templates/org/richfaces/htmlHotKey.jspx 2008-06-11 19:59:38 UTC (rev 9009)
@@ -11,7 +11,6 @@
>
<f:clientid var="clientId"/>
<c:set var="key" value="#{component.attributes['key']}"/>
- <c:set var="operation" value="#{component.attributes['operation']}"/>
<c:set var="timing" value="#{component.attributes['timing']}"/>
<c:set var="type" value="#{component.attributes['type']}"/>
<c:set var="propagete" value="#{component.attributes['propagete']}"/>
@@ -22,41 +21,38 @@
<h:scripts>/org/richfaces/renderkit/html/scripts/jquery/jquery.js,/org/richfaces/renderkit/html/scripts/jquery.hotkeys.js,/org/richfaces/renderkit/html/scripts/hotKey.js</h:scripts>
<jsp:scriptlet>
<![CDATA[
- StringBuffer options= new StringBuffer("{");
- String operation = (String) variables.getVariable("operation");
- options.append("operation:'");
- options.append(operation);
- options.append("'");
+ StringBuffer options = new StringBuffer("{");
+
+ String timing = (String) variables.getVariable("timing");
+ options.append("timing:'");
+ options.append(timing);
+ options.append("'");
+
String type = (String) variables.getVariable("type");
- if (!type.equals("")) {
+ if (! type.equals("")) {
options.append(",type:'");
options.append(type);
options.append("'");
}
String propagete = (String) variables.getVariable("propagete");
- if (!propagete.equals("")) {
+ if (propagete!=null) {
options.append(",propagete:");
options.append(propagete);
}
String disableInInput = (String) variables.getVariable("disableInInput");
- if (!propagete.equals("")) {
+ if (disableInInput!=null) {
options.append(",disableInInput:");
options.append(disableInInput);
}
String checkParent = (String) variables.getVariable("checkParent");
- if (!propagete.equals("")) {
+ if (checkParent!=null) {
options.append(",checkParent:");
options.append(checkParent);
}
- String timing = (String) variables.getVariable("timing");
- options.append(",timing:'");
- options.append(timing);
- options.append("'");
-
options.append("}");
variables.setVariable("options", options);
16 years