Author: ilya_shaikovsky
Date: 2010-05-14 10:17:22 -0400 (Fri, 14 May 2010)
New Revision: 17052
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/ViewController.java
root/examples/richfaces-showcase/trunk/src/main/webapp/WEB-INF/lib/
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/toolBar.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/component-sample.xhtml
Modified:
root/examples/richfaces-showcase/trunk/
root/examples/richfaces-showcase/trunk/pom.xml
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable.xhtml
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml
Log:
https://jira.jboss.org/jira/browse/RF-8298
integration of tables started
Property changes on: root/examples/richfaces-showcase/trunk
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.classpath
.project
Modified: root/examples/richfaces-showcase/trunk/pom.xml
===================================================================
--- root/examples/richfaces-showcase/trunk/pom.xml 2010-05-14 12:43:39 UTC (rev 17051)
+++ root/examples/richfaces-showcase/trunk/pom.xml 2010-05-14 14:17:22 UTC (rev 17052)
@@ -36,6 +36,11 @@
<artifactId>slf4j-simple</artifactId>
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.richfaces.ui-sandbox</groupId>
+ <artifactId>tables-ui</artifactId>
+ <version>4.0.0-SNAPSHOT</version>
+ </dependency>
</dependencies>
<build>
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/SampleToolBarItem.java 2010-05-14
14:17:22 UTC (rev 17052)
@@ -0,0 +1,28 @@
+package org.richfaces.demo.view;
+
+public class SampleToolBarItem {
+ private String name;
+ private String outcome;
+
+ public SampleToolBarItem(String name, String outcome) {
+ this.name = name;
+ this.outcome = outcome;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getOutcome() {
+ return outcome;
+ }
+
+ public void setOutcome(String outcome) {
+ this.outcome = outcome;
+ }
+
+}
Added:
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/ViewController.java
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/ViewController.java
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/java/org/richfaces/demo/view/ViewController.java 2010-05-14
14:17:22 UTC (rev 17052)
@@ -0,0 +1,22 @@
+package org.richfaces.demo.view;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.faces.bean.ManagedBean;
+import javax.faces.bean.ViewScoped;
+
+@ManagedBean
+@ViewScoped
+public class ViewController {
+
+ public List<SampleToolBarItem> getTableToolBarItems() {
+ List<SampleToolBarItem> items = new ArrayList<SampleToolBarItem>();
+ SampleToolBarItem item = new SampleToolBarItem("Simple",
"/richfaces/dataTable/simpleTable.jsf");
+ items.add(item);
+ item = new SampleToolBarItem("Complex layouts",
"/richfaces/dataTable/subtables.jsf");
+ items.add(item);
+ return items;
+ }
+
+}
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/toolBar.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/toolBar.xhtml
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/resources/rich/toolBar.xhtml 2010-05-14
14:17:22 UTC (rev 17052)
@@ -0,0 +1,32 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:c="http://java.sun.com/jsp/jstl/core"
+
xmlns:composite="http://java.sun.com/jsf/composite"
+
xmlns:a4j="http://richfaces.org/a4j">
+ <head>
+ <title>toolBar</title>
+ </head>
+<body>
+
+<composite:interface>
+ <composite:attribute name="items" required="true"/>
+</composite:interface>
+<composite:implementation>
+ <table>
+ <tbody>
+ <a4j:repeat value="#{cc.attrs.items}" var="item">
+ <tr>
+ <td>
+ <h:link value="#{item.name}" outcome="#{item.outcome}"
/>
+ </td>
+ </tr>
+ </a4j:repeat>
+ </tbody>
+ </table>
+</composite:implementation>
+</body>
+</html>
\ No newline at end of file
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/simpleTable.xhtml 2010-05-14
14:17:22 UTC (rev 17052)
@@ -0,0 +1,47 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:tbl="http://richfaces.org/rich">
+
+ <ui:composition>
+ <h:form>
+ <tbl:extendedDataTable frozenColumns="1"
value="#{carsBean.allCars}" rows="100" var="car"
id="table" clientRows="14" style="width:300px;
height:300px;">
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Make" />
+ </f:facet>
+ <h:outputText value="#{car.make}"/>
+ <f:facet name="footer">
+ remove this also to check
+ </f:facet>
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}"/>
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}"/>
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Actions" />
+ </f:facet>
+ <a4j:commandLink value="Edit" action="#{carsBean.edit}"
render="table"/>
+ <h:outputText value=" " />
+ <a4j:commandLink value="Remove" action="#{carsBean.remove}"
render="table"/>
+ </tbl:column>
+ <f:facet name="footer">
+ <h:outputText value="remove footer for test" />
+ </f:facet>
+ </tbl:extendedDataTable>
+ </h:form>
+ </ui:composition>
+</html>
\ No newline at end of file
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable/subtables.xhtml 2010-05-14
14:17:22 UTC (rev 17052)
@@ -0,0 +1,41 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:tbl="http://richfaces.org/rich">
+
+ <ui:composition>
+ <h:form>
+ <tbl:dataTable value="#{carsBean.allCars}" var="car"
id="table">
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Make" />
+ </f:facet>
+ <h:outputText value="#{car.make}"/>
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Model" />
+ </f:facet>
+ <h:outputText value="#{car.model}"/>
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Price" />
+ </f:facet>
+ <h:outputText value="#{car.price}"/>
+ </tbl:column>
+ <tbl:column>
+ <f:facet name="header">
+ <h:outputText value="Actions" />
+ </f:facet>
+ <a4j:commandLink value="Edit" action="#{carsBean.edit}"
render="table"/>
+ <h:outputText value=" " />
+ <a4j:commandLink value="Remove" action="#{carsBean.remove}"
render="table"/>
+ </tbl:column>
+ </tbl:dataTable>
+ </h:form>
+ </ui:composition>
+</html>
\ No newline at end of file
Modified:
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable.xhtml 2010-05-14
12:43:39 UTC (rev 17051)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/richfaces/dataTable.xhtml 2010-05-14
14:17:22 UTC (rev 17052)
@@ -2,16 +2,15 @@
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:ui="http://java.sun.com/jsf/facelets">
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:rich="http://java.sun.com/jsf/composite/rich">
<ui:composition template="/templates/main.xhtml">
<ui:define name="body">
- <p>
- </p>
- <fieldset>
- <legend>Table Edit Sample</legend>
- <ui:include src="/richfaces/dataTable/dataTableEdit.xhtml" />
- </fieldset>
+ <rich:toolBar items="#{viewController.tableToolBarItems}" />
+ <p></p>
+ <fieldset><legend>Table Edit Sample</legend> <ui:include
+ src="/richfaces/dataTable/simpleTable.xhtml" /></fieldset>
</ui:define>
</ui:composition>
Added:
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/component-sample.xhtml
===================================================================
---
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/component-sample.xhtml
(rev 0)
+++
root/examples/richfaces-showcase/trunk/src/main/webapp/templates/component-sample.xhtml 2010-05-14
14:17:22 UTC (rev 17052)
@@ -0,0 +1,15 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html
xmlns="http://www.w3.org/1999/xhtml"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:rich="http://java.sun.com/jsf/composite/rich">
+
+<ui:composition template="/templates/main.xhtml">
+ <ui:define name="body">
+
+ <ui:insert/>
+ </ui:define>
+</ui:composition>
+
+</html>
\ No newline at end of file
Modified: root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml
===================================================================
--- root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml 2010-05-14
12:43:39 UTC (rev 17051)
+++ root/examples/richfaces-showcase/trunk/src/main/webapp/templates/main.xhtml 2010-05-14
14:17:22 UTC (rev 17052)
@@ -1,3 +1,4 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"