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" />