Author: abelevich
Date: 2010-04-29 09:20:27 -0400 (Thu, 29 Apr 2010)
New Revision: 16841
Modified:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/DataBean.java
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java
root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
Log:
Modified:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/DataBean.java
===================================================================
---
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/DataBean.java 2010-04-29
12:31:50 UTC (rev 16840)
+++
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/DataBean.java 2010-04-29
13:20:27 UTC (rev 16841)
@@ -21,6 +21,47 @@
Map<Object,Integer> stateMap = new HashMap<Object, Integer>();
+ private String test1 = "test1";
+
+ private String test2 = "test2";
+
+ private String target = "targetId";
+
+ private String operation = "operation";
+
+
+ public String getTarget() {
+ return target;
+ }
+
+ public void setTarget(String target) {
+ this.target = target;
+ }
+
+ public String getOperation() {
+ return operation;
+ }
+
+ public void setOperation(String operation) {
+ this.operation = operation;
+ }
+
+ public String getTest1() {
+ return test1;
+ }
+
+ public void setTest1(String test1) {
+ this.test1 = test1;
+ }
+
+ public String getTest2() {
+ return test2;
+ }
+
+ public void setTest2(String test2) {
+ this.test2 = test2;
+ }
+
int page = 1;
public int getPage() {
Modified:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java
===================================================================
---
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java 2010-04-29
12:31:50 UTC (rev 16840)
+++
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/utils/EmployeeUtils.java 2010-04-29
13:20:27 UTC (rev 16841)
@@ -14,7 +14,7 @@
List<Employee> employeeList = new ArrayList<Employee>();
addEmployeeToCollection(employeeList, "9Alexander Ivanov",
"Director", "aivanov(a)beltelecom.by", "AMicrosoft",
"+375 29 255 00 00", "Minsk, Belarus");
- addEmployeeToCollection(employeeList, "4Bill Gates",
"President", "bgates(a)microsoft.com", "AMicrosoft",
"817-335-5881", "Tokyo, Japan");
+ addEmployeeToCollection(employeeList, "4Bill Gates",
"President", "bgates(a)microsoft.com", "AMicrosoft",
"817-335-5881", "Tokyo, Japan");
addEmployeeToCollection(employeeList, "Amanda Gellhouse",
"IT/Internet Support; Manager", "agellhouse(a)sun.com", "Sun",
"853-729-3784", "Sun Valley, USA");
addEmployeeToCollection(employeeList, "2Hideo Kodzima", "Vice
Prezident", "khideo(a)konami.jp", "AMicrosoft",
"419-615-2730", "Tokyo, Japan");
addEmployeeToCollection(employeeList, "3Stan Carpenter", "Lead
Designer", "scarpenter(a)ndogs.com", "AMicrosoft",
"714-647-3380", "Tokyo, Japan");
@@ -633,7 +633,7 @@
addEmployeeToCollection(employeeList, "Daniel Crespo",
"IT/Internet Support; Analyst", "dcrespo(a)bokken.com", "Bokken
As", "+91-22-6659-7300", "Wien, Austria");
addEmployeeToCollection(employeeList, "Petr Cumba",
"IT-chef", "pcumba(a)abarta.com", "ABARTA, Inc.",
"701-277-0403", "Liberal, KS United States");
addEmployeeToCollection(employeeList, "James Curley", "Network
Manager", "jcurley(a)triboro.com", "Triboro Gulf",
"+047-52020000", "Nesflaten, Rogaland Norway");
- addEmployeeToCollection(employeeList, "Lu Dam", "SVP Operations
and Technical", "ludam(a)krepro.com", "Krepro As",
"313-876-0190", "Walters, OK United States");
+ addEmployeeToCollection(employeeList, "Lu Dam", "SVP Operations
and Technical", "ludam(a)krepro.com", "Krepro As",
"313-876-0190", "Walters, OK United States");/*
addEmployeeToCollection(employeeList, "Randy Davenport", "Database
Administrator", "rdevenport(a)savatrip.com", "Sav-A-Trip, Inc",
"+032-38807700", "Adelaide, Australia");
addEmployeeToCollection(employeeList, "Kevin A. Kohlscheen",
"Computer Specialist", "kakohlscheen(a)eni.com", "Eni S.p.A.",
"+031-455223300", "Andria, Bari Italy");
addEmployeeToCollection(employeeList, "M Koetsier",
"Programmer", "mkoetsier(a)pinnergy.com", "Pinnergy Ltd",
"316-838-4663", "Moscow, Russia");
@@ -1345,7 +1345,7 @@
addEmployeeToCollection(employeeList, "Andy Kirkham", "VP
Administration", "akirkham(a)pacificorp.com", "Pacificorp",
"561-642-2153", "Ashton, ID United States");
addEmployeeToCollection(employeeList, "Derrik Khoo Sin Huat",
"CTO", "aksinhuat(a)aes.com", "The AES Corporation",
"864-233-4064", "Sydney, Australia");
addEmployeeToCollection(employeeList, "Rick Kelsven", "Network
Analyst", "rkelsven(a)rudny.com", "Rudny's Inc",
"208-356-4991", "Bangkok, Thailand");
-
+*/
return employeeList;
}
Modified: root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2010-04-29
12:31:50 UTC (rev 16840)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2010-04-29
13:20:27 UTC (rev 16841)
@@ -5,6 +5,8 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:rich="http://richfaces.org/rich"
xmlns:ds="http://richfaces.org/datascroller"
+
xmlns:cc="http://richfaces.org/componentControl"
+
<f:view contentType="text/html"/>
@@ -27,7 +29,11 @@
<f:facet name="header">
<h:outputText id="columnHeader1" value="Column Header
Facet"/>
</f:facet>
-
+
+ <rich:toggleControl for="expandedSubTable"
expandControl="resources/images/+.gif"
collapseControl="resources/images/-.gif">
+
+ </rich:toggleControl>
+
<h:outputText value="#{record.name}" />
<f:facet name="footer">
<h:outputText id="columnFooter1" value="Column Footer Facet
1"/>
@@ -47,7 +53,7 @@
<rich:subTable id="expandedSubTable" var="company"
value="#{record.companies}" rows="1" switchType="ajax"
expanded="true">
<f:facet name="header">
- <ds:dataScroller id="subscroller" for="expandedSubTable"
page="#{dataBean.stateMap[rowKey]}"
maxPages="3"></ds:dataScroller >
+ <ds:dataScroller id="subscroller" for="expandedSubTable"
maxPages="3"></ds:dataScroller >
</f:facet>
<f:facet name="footer">
@@ -74,7 +80,36 @@
</rich:dataTable>
<br/>
- <h:commandButton value="submit" />
+
+ <!-- cc:componentControl event="click"
target="#{dataBean.target}" operation="#{dataBean.operation}">
+ <f:param name="event" value="event"/>
+ <cc:hashParameter>
+ <f:param name="key1" value="value1"/>
+ <f:param name="key2" value="value2"/>
+ <f:param name="key3" value="value3"/>
+ <cc:hashParameter name="nested1">
+ <f:param name="key11" value="value11"/>
+ </cc:hashParameter>
+ </cc:hashParameter>
+ <cc:hashParameter name="hashkey1">
+ <f:param name="keyhash1" value="value1"/>
+ <f:param name="keyhash2" value="value2"/>
+ </cc:hashParameter>
+ <h:commandButton value="richfaces1"/>
+ <h:commandButton value="richfaces2"/>
+ </cc:componentControl -->
+
+
+ <h:commandButton value="next">
+ <cc:componentControl event="click" target="form1:scroller1"
operation="switchToPage">
+ <f:param value="fastforward"/>
+ </cc:componentControl>
+ </h:commandButton>
+
+ <h:commandButton value="previous">
+ <cc:componentControl event="click" target="form1:scroller1"
operation="previous"/>
+ </h:commandButton>
+
</h:form>
</h:body>
</html>