Author: ilya_shaikovsky
Date: 2008-03-25 09:48:57 -0400 (Tue, 25 Mar 2008)
New Revision: 7167
Added:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java
trunk/samples/richfaces-demo/src/main/webapp/images/cn_Columns.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_ComboBox.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceInput.gif
trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceSelect.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_ComboBox.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceInput.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceSelect.gif
trunk/samples/richfaces-demo/src/main/webapp/images/ico_columns.gif
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml
Log:
columns example added and file Upload example started
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-03-25
13:45:17 UTC (rev 7166)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/datatablescroller/DataTableScrollerBean.java 2008-03-25
13:48:57 UTC (rev 7167)
@@ -201,22 +201,22 @@
columns.clear();
String header;
String footer="";
- header = "Chevrolet Corvette";
+ header = "Chevrolet";
Facet facet = new Facet(header ,footer);
columns.add(facet);
- header = "Ford Explorer";
+ header = "Ford";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "Nissan Maxima";
+ header = "Nissan";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "Toyota Camry";
+ header = "Toyota";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "GMC Yukon";
+ header = "GMC";
facet = new Facet(header ,footer);
columns.add(facet);
- header = "Infiniti G35";
+ header = "Infiniti";
facet = new Facet(header ,footer);
columns.add(facet);
}
Added: trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java
===================================================================
--- trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java
(rev 0)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/File.java 2008-03-25
13:48:57 UTC (rev 7167)
@@ -0,0 +1,27 @@
+package org.richfaces.demo.fileUpload;
+
+public class File {
+
+ private String Name;
+ private int length;
+ private byte[] data;
+ public String getName() {
+ return Name;
+ }
+ public void setName(String name) {
+ Name = name;
+ }
+ public int getLength() {
+ return length;
+ }
+ public void setLength(int length) {
+ this.length = length;
+ }
+ public byte[] getData() {
+ return data;
+ }
+ public void setData(byte[] data) {
+ this.data = data;
+ }
+
+}
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java 2008-03-25
13:45:17 UTC (rev 7166)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/fileUpload/FileUploadBean.java 2008-03-25
13:48:57 UTC (rev 7167)
@@ -3,7 +3,10 @@
*/
package org.richfaces.demo.fileUpload;
+import java.awt.Graphics2D;
import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
@@ -13,12 +16,32 @@
*
*/
public class FileUploadBean {
+
+ private ArrayList<File> files = new ArrayList<File>();
+
public FileUploadBean() {
}
public void listener(UploadEvent event) throws IOException{
UploadItem item = event.getUploadItem();
System.out.println("FileUploadBean.listener()");
- System.out.println("File : '" + item.getFileName() + "' was
uploaded");
+ File file = new File();
+ file.setLength(item.getData().length);
+ file.setName(item.getFileName());
+ file.setData(item.getData());
+ files.add(file);
}
+
+ public void paint(OutputStream outputStream, Object obj) throws IOException {
+ outputStream.write((byte[])obj);
+ System.out.println("FileUploadBean.paint()");
+ }
+
+ public ArrayList<File> getFiles() {
+ return files;
+ }
+
+ public void setFiles(ArrayList<File> files) {
+ this.files = files;
+ }
}
Modified:
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties
===================================================================
---
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-03-25
13:45:17 UTC (rev 7166)
+++
trunk/samples/richfaces-demo/src/main/resources/org/richfaces/demo/common/components.properties 2008-03-25
13:48:57 UTC (rev 7167)
@@ -69,14 +69,15 @@
portlet= ajaxMisc, Ajax Portlet, /images/ico_common.gif,
/images/cn_AjaxPortlet.gif,
RichFacesComponentsLibrary.html#portlet,
jbossajax4jsf/freezone/docs/tlddoc/a4j/portlet.html,
jbossajax4jsf/freezone/docs/apidoc/org/ajax4jsf/ajax/UIPortlet.html,
/richfaces/portlet.jsf
effect= richMisc, Effect, /images/ico_common.gif,
/images/cn_Effect.gif,
RichFacesComponentsLibrary.html#effect,
jbossrichfaces/freezone/docs/tlddoc/rich/effect.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIEffect.html,
/richfaces/effect.jsf
contextMenu= richMenu, Context Menu, /images/ico_ContextMenu.gif,
/images/cn_contextMenu.gif,
RichFacesComponentsLibrary.html\#contextMenu,
jbossrichfaces/freezone/docs/tlddoc/rich/contextMenu.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIContextMenu.html,
/richfaces/contextMenu.jsf
-componentControl= richMisc, Component Control, /images/ico_common.gif,
\t\t/images/cn_componentControl.gif,
RichFacesComponentsLibrary.html\#componentControl,
jbossrichfaces/freezone/docs/tlddoc/rich/componentControl.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomponentControl.html,
/richfaces/componentControl.jsf
-orderingList= richSelect, Ordering List, \t \t/images/ico_OrderingList.gif,
\t/images/cn_orderingList.gif,
RichFacesComponentsLibrary.html\#orderingList,
jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIorderingList.html,
\t\t/richfaces/orderingList.jsf
-listShuttle= richSelect, List Shuttle, \t\t \t\t/images/ico_ListShuttle.gif,
/images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#listShuttle,
jbossrichfaces/freezone/docs/tlddoc/rich/listShuttle.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIlistShuttle.html,
\t\t/richfaces/listShuttle.jsf
-pickList= richSelect, Pick List, \t\t\t\t\t/images/ico_DataTable.gif,
/images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#pickList,
jbossrichfaces/freezone/docs/tlddoc/rich/pickList.html,
\t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIpickList.html,
\t\t\t\t/richfaces/pickList.jsf
-progressBar= richOutputs, Progress Bar, \t\t \t\t/images/ico_DataTable.gif,
/images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#progressBar,
jbossrichfaces/freezone/docs/tlddoc/rich/progressBar.html,
\t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIprogressBar.html,
\t/richfaces/progressBar.jsf
-comboBox= richInputs, Combo Box, \t\t/images/ico_ComboBox.gif,
\t\t/images/cn_ComboBox.gif, RichFacesComponentsLibrary.html\#comboBox,
jbossrichfaces/freezone/docs/tlddoc/rich/comboBox.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomboBox.html,
\t\t\t\t\t/richfaces/comboBox.jsf
-inplaceInput= richInputs, Inplace Input,
\t\t/images/ico_InplaceInput.gif, \t\t/images/cn_InplaceInput.gif,
RichFacesComponentsLibrary.html\#inplaceInput,
jbossrichfaces/freezone/docs/tlddoc/rich/inplaceInput.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceInput.html,
\t\t\t\t\t/richfaces/inplaceInput.jsf
-inplaceSelect= richInputs, Inplace Select,
\t\t/images/ico_InplaceSelect.gif, \t\t/images/cn_InplaceSelect.gif,
RichFacesComponentsLibrary.html\#inplaceSelect,
jbossrichfaces/freezone/docs/tlddoc/rich/inplaceSelect.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceSelect.html,
\t\t\t\t\t/richfaces/inplaceSelect.jsf
-sorting= richDataIterators, Table Sorting, \t\t/images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/sortingFeature.jsf
-filtering= richDataIterators, Table Filtering, \t\t/images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/filteringFeature.jsf
-columns =richDataIterators, \t\tColumns, \t\t/images/ico_columns.gif,
\t\t/images/cn_Columns.gif, \t\t\tRichFacesComponentsLibrary.html\#columns,
jbossrichfaces/freezone/docs/tlddoc/rich/columns.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIColumns.html,
\t\t\t\t\t/richfaces/columns.jsf
\ No newline at end of file
+componentControl= richMisc, Component Control, /images/ico_common.gif,
\t\t/images/cn_componentControl.gif,
RichFacesComponentsLibrary.html\#componentControl,
jbossrichfaces/freezone/docs/tlddoc/rich/componentControl.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomponentControl.html,
/richfaces/componentControl.jsf
+orderingList= richSelect, Ordering List, /images/ico_OrderingList.gif,
\t/images/cn_orderingList.gif, RichFacesComponentsLibrary.html\#orderingList,
jbossrichfaces/freezone/docs/tlddoc/rich/orderingList.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIorderingList.html,
\t\t/richfaces/orderingList.jsf
+listShuttle= richSelect, List Shuttle, /images/ico_ListShuttle.gif,
/images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#listShuttle,
jbossrichfaces/freezone/docs/tlddoc/rich/listShuttle.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIlistShuttle.html,
\t\t/richfaces/listShuttle.jsf
+pickList= richSelect, Pick List, /images/ico_DataTable.gif,
/images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#pickList,
jbossrichfaces/freezone/docs/tlddoc/rich/pickList.html,
\t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIpickList.html,
\t\t\t\t/richfaces/pickList.jsf
+progressBar= richOutputs, Progress Bar, /images/ico_DataTable.gif,
/images/cn_listShuttle.gif, RichFacesComponentsLibrary.html\#progressBar,
jbossrichfaces/freezone/docs/tlddoc/rich/progressBar.html,
\t\tjbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIprogressBar.html,
\t/richfaces/progressBar.jsf
+comboBox= richInputs, Combo Box, /images/ico_ComboBox.gif,
\t\t/images/cn_ComboBox.gif, RichFacesComponentsLibrary.html\#comboBox,
jbossrichfaces/freezone/docs/tlddoc/rich/comboBox.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcomboBox.html,
\t\t\t\t\t/richfaces/comboBox.jsf
+inplaceInput= richInputs, Inplace Input, /images/ico_InplaceInput.gif,
\t\t/images/cn_InplaceInput.gif,
RichFacesComponentsLibrary.html\#inplaceInput,
jbossrichfaces/freezone/docs/tlddoc/rich/inplaceInput.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceInput.html,
\t\t\t\t\t/richfaces/inplaceInput.jsf
+inplaceSelect= richInputs, Inplace Select,
/images/ico_InplaceSelect.gif, \t\t/images/cn_InplaceSelect.gif,
RichFacesComponentsLibrary.html\#inplaceSelect,
jbossrichfaces/freezone/docs/tlddoc/rich/inplaceSelect.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIinplaceSelect.html,
\t\t\t\t\t/richfaces/inplaceSelect.jsf
+sorting= richDataIterators, Table Sorting, /images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/sortingFeature.jsf
+filtering= richDataIterators, Table Filtering, /images/ico_DataTable.gif,
\t\t/images/cn_DataTable.gif, RichFacesComponentsLibrary.html\#dataTable,
jbossrichfaces/freezone/docs/tlddoc/rich/dataTable.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIdataTable.html,
\t\t\t\t\t/richfaces/filteringFeature.jsf
+columns = richDataIterators, Columns, /images/ico_columns.gif,
\t\t/images/cn_Columns.gif, \t\t\tRichFacesComponentsLibrary.html\#columns,
jbossrichfaces/freezone/docs/tlddoc/rich/columns.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIcolumns.html,
\t\t\t\t\t/richfaces/columns.jsf
+fileUpload = richInputs, File Upload, /images/ico_FileUpload.gif,
\t\t/images/cn_FileUpload.gif,
\t\t\tRichFacesComponentsLibrary.html\#fileUpload,
jbossrichfaces/freezone/docs/tlddoc/rich/fileUpload.html,
jbossrichfaces/freezone/docs/apidoc/org/richfaces/component/UIfileUpload.html,
\t\t\t\t\t/richfaces/fileUpload.jsf
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-03-25
13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/faces-config.xml 2008-03-25
13:48:57 UTC (rev 7167)
@@ -328,6 +328,14 @@
<to-view-id>/richfaces/include/examples/wstep2.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
+ <navigation-rule>
+ <from-view-id>/richfaces/columns.xhtml</from-view-id>
+ <navigation-case>
+ <from-outcome>sortingFeature</from-outcome>
+ <to-view-id>/richfaces/sortingFeature.xhtml</to-view-id>
+ <redirect/>
+ </navigation-case>
+ </navigation-rule>
<lifecycle>
<phase-listener>org.richfaces.treemodeladaptor.PostbackPhaseListener</phase-listener>
</lifecycle>
Modified: trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-03-25 13:45:17 UTC
(rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/WEB-INF/web.xml 2008-03-25 13:48:57 UTC
(rev 7167)
@@ -67,7 +67,7 @@
<filter-class>org.ajax4jsf.Filter</filter-class>
<init-param>
<param-name>createTempFiles</param-name>
- <param-value>true</param-value>
+ <param-value>false</param-value>
</init-param>
<init-param>
<param-name>maxRequestSize</param-name>
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Columns.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_Columns.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_ComboBox.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/cn_ComboBox.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceInput.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceInput.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceSelect.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/cn_InplaceSelect.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_ComboBox.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_ComboBox.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceInput.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceInput.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceSelect.gif
===================================================================
(Binary files differ)
Property changes on:
trunk/samples/richfaces-demo/src/main/webapp/images/ico_InplaceSelect.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/samples/richfaces-demo/src/main/webapp/images/ico_columns.gif
===================================================================
(Binary files differ)
Property changes on: trunk/samples/richfaces-demo/src/main/webapp/images/ico_columns.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml 2008-03-25
13:45:17 UTC (rev 7166)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/examples/example.xhtml 2008-03-25
13:48:57 UTC (rev 7167)
@@ -1,19 +1,26 @@
<ui:composition
xmlns="http://www.w3.org/1999/xhtml"
-
xmlns:ui="http://java.sun.com/jsf/facelets"
-
xmlns:h="http://java.sun.com/jsf/html"
-
xmlns:f="http://java.sun.com/jsf/core"
-
xmlns:a4j="http://richfaces.org/a4j"
-
xmlns:rich="http://richfaces.org/rich">
-
- <h:form>
- <rich:dataTable value="#{dataTableScrollerBean.model}"
var="model">
- <rich:columns value="#{dataTableScrollerBean.columns}"
var="columns" index="ind">
- <f:facet name="header">
- <h:outputText value="#{columns.header}"/>
- </f:facet>
- <h:outputText value="#{model[ind].model}"/>
- </rich:columns>
- </rich:dataTable>
- </h:form>
-
+
xmlns:ui="http://java.sun.com/jsf/facelets"
+
xmlns:h="http://java.sun.com/jsf/html"
+
xmlns:f="http://java.sun.com/jsf/core"
+
xmlns:a4j="http://richfaces.org/a4j"
+
xmlns:rich="http://richfaces.org/rich">
+ <h:form>
+ <rich:dataTable value="#{dataTableScrollerBean.model}"
var="model">
+
+ <rich:columns value="#{dataTableScrollerBean.columns}"
var="columns"
+ index="ind" sortBy="#{model[ind].price}">
+
+ <f:facet name="header">
+ <h:outputText value="#{columns.header}" />
+ </f:facet>
+
+ <h:outputText value="#{model[ind].model} " />
+ <h:outputText value="#{model[ind].mileage} miles " />
+ <h:outputText value="#{model[ind].price}$"
+ style="font-style:italic;" />
+
+ </rich:columns>
+
+ </rich:dataTable>
+ </h:form>
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml 2008-03-25
13:45:17 UTC (rev 7166)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/columns/usage.xhtml 2008-03-25
13:48:57 UTC (rev 7167)
@@ -9,17 +9,36 @@
<ui:define name="sample">
<p>
- SHORT DESCRIPTION
+ The tag allows <b>dynamic columns</b> in a
<i>rich:dataTable</i>. It is used like a
+ UIData component which iterates through a data model to create the columns.
</p>
+ <p>
+ The component uses standard <b>value/var</b> pair of attributes to
provide provide
+ binding to data model and request scoped variable for iteration through
+ this data model.
+ </p>
+ <p>
+ Next simple example shows you simple use-case where the ten type of cars created
+ and list of models with prices generated for this type of car. In the dataTable
+ cars grouped by type in separate columns.
+ </p>
<div class="sample-container" >
<ui:include src="/richfaces/columns/examples/example.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath"
value="/richfaces/columns/examples/example.xhtml"/>
</ui:include>
</div>
- <p>
- DESCRIPTION
- </p>
+ <h:form>
+ <p>
+ Additionally as you could see
+ <h:commandLink value="Sorting Feature" immediate="true"
action="sortingFeature"/>
+ could be added to this component
+ in the same manner as for simple rich:column.
+ </p>
+ <p>
+ In this example every column provides sorting by car prices
+ </p>
+ </h:form>
</ui:define>
</ui:composition>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml 2008-03-25
13:45:17 UTC (rev 7166)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml 2008-03-25
13:48:57 UTC (rev 7167)
@@ -4,8 +4,22 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <h:form>
+
+ <a4j:form>
<rich:fileUpload fileUploadListener="#{fileUploadBean.listener}"
- maxFilesQuantity="10" />
- </h:form>
+ maxFilesQuantity="5" reRender="table">
+ <a4j:support event="onuploadcomplete"
reRender="table"></a4j:support>
+ </rich:fileUpload>
+ <rich:dataTable value="#{fileUploadBean.files}" var="file"
id="table">
+ <rich:column>
+ <h:outputText value="#{file.name}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <h:outputText value="#{file.length}"></h:outputText>
+ </rich:column>
+ <rich:column>
+ <a4j:mediaOutput createContent="#{fileUploadBean.paint}"
value="file.data" mimeType="image/jpeg" element="img"/>
+ </rich:column>
+ </rich:dataTable>
+ </a4j:form>
</ui:composition>
\ No newline at end of file
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml 2008-03-25
13:45:17 UTC (rev 7166)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/filteringFeature/examples/simpleFiltering.xhtml 2008-03-25
13:48:57 UTC (rev 7167)
@@ -9,24 +9,31 @@
.rich-inplace-view{
color:gray;
border-bottom-color:gray;
- }
+ }
+ .body{
+ background-color:red !important;
+ }
</style>
- <rich:dataTable value="#{capitalsBean.capitals}" var="cap"
width="500px">
+ <input type="text" value="123" style="background :
transparent; border : 0"/>
+ <rich:dataTable value="#{capitalsBean.capitals}" var="cap"
width="500px" rows="15">
<f:facet name="header">
<h:outputText value="Filtering Example"/>
</f:facet>
- <rich:column>
- <f:facet name="header">
- <h:graphicImage
value="/images/ico_DataTable.gif"></h:graphicImage>
- </f:facet>
- <h:graphicImage value="#{cap.stateFlag}"/>
- </rich:column>
<rich:column filterBy="#{cap.state}" filterDefaultLabel="click to
filter">
- <h:outputText value="#{cap.state}"></h:outputText>
+ <h:outputText value="#{cap.state}"/>
</rich:column>
<rich:column filterBy="#{cap.name}" filterDefaultLabel="click to
filter">
<h:outputText value="#{cap.name}"/>
</rich:column>
+ <rich:column>
+ <f:facet name="header">
+ <h:outputText value="State time zone:"/>
+ </f:facet>
+ <h:outputText value="#{cap.timeZone}"/>
+ </rich:column>
+ <f:facet name="footer">
+ <rich:datascroller renderIfSinglePage="false"/>
+ </f:facet>
</rich:dataTable>
</h:form>
</ui:composition>
\ No newline at end of file