Author: abelevich
Date: 2009-11-20 12:15:37 -0500 (Fri, 20 Nov 2009)
New Revision: 15949
Modified:
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/DataBean.java
root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
Log:
toggleListener
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 2009-11-20
17:14:19 UTC (rev 15948)
+++
root/examples-sandbox/trunk/components/tables/src/main/java/org/richfaces/demo/DataBean.java 2009-11-20
17:15:37 UTC (rev 15949)
@@ -7,6 +7,7 @@
import org.richfaces.demo.model.Employee;
import org.richfaces.demo.utils.EmployeeUtils;
+import org.richfaces.event.ToggleEvent;
@ManagedBean(name="dataBean")
@SessionScoped
@@ -26,4 +27,9 @@
return employeeList;
}
+ public void processToggle(ToggleEvent event) {
+ System.out.println("DataBean.processToggle()");
+ }
+
+
}
Modified: root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml
===================================================================
--- root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-20
17:14:19 UTC (rev 15948)
+++ root/examples-sandbox/trunk/components/tables/src/main/webapp/home.xhtml 2009-11-20
17:15:37 UTC (rev 15949)
@@ -29,7 +29,7 @@
<h:outputText id="columnHeader1" value="Column Header
Facet"/>
</f:facet>
- <rich:toggleControl forId="expandedSubTable"
expandControl="resources/images/+.gif"
collapseControl="resources/images/-.gif"/>
+ <rich:toggleControl forId="expandedSubTable"
expandControl="resources/images/+.gif"
collapseControl="resources/images/-.gif" />
<h:outputText value="#{record.name}" />
<f:facet name="footer">
<h:outputText id="columnFooter1" value="Column Footer
Facet"/>
@@ -46,7 +46,7 @@
- <rich:subTable id="expandedSubTable" var="company"
value="#{record.company}" rows="20" expanded="true"
switchType="client">
+ <rich:subTable id="expandedSubTable" var="company"
value="#{record.company}" rows="20" expanded="true"
switchType="client" toggleListener="#{dataBean.processToggle}">
<f:facet name="header">
<rich:colGroup id="headerFacet1" >
<rich:column><h:outputText id="headerFacet12"
value="company"> </h:outputText></rich:column>
@@ -77,6 +77,7 @@
</f:facet>
</rich:dataTable>
+ <h:commandButton value="submit" />
</h:form>
</h:body>