Author: ilya_shaikovsky
Date: 2008-03-21 08:23:15 -0400 (Fri, 21 Mar 2008)
New Revision: 7042
Added:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/pickList/PickListBean.java
trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/externalSortingUsage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/sortingUsage.xhtml
Log:
refactoring according to Sergey's proposal (split filtering and sorting)
Modified:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/pickList/PickListBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/pickList/PickListBean.java 2008-03-21
11:44:22 UTC (rev 7041)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/pickList/PickListBean.java 2008-03-21
12:23:15 UTC (rev 7042)
@@ -3,42 +3,24 @@
*/
package org.richfaces.demo.pickList;
-import java.util.ArrayList;
+import java.util.List;
-import javax.faces.model.SelectItem;
-
/**
* @author Ilya Shaikovsky
*
*/
public class PickListBean {
- private ArrayList<String> result;
+ private List<String> result;
- private SelectItem[] optionsAvailable;
-
- public SelectItem[] getOptionsAvailable() {
- return optionsAvailable;
- }
-
- public void setOptionsAvailable(SelectItem[] optionsAvailable) {
- this.optionsAvailable = optionsAvailable;
- }
-
public PickListBean() {
- optionsAvailable = new SelectItem[5];
- for (int i = 0; i < optionsAvailable.length; i++) {
- optionsAvailable[i] = new SelectItem();
- optionsAvailable[i].setLabel("Generated Option " + i);
- optionsAvailable[i].setValue("Value " + i);
- }
}
- public ArrayList<String> getResult() {
+ public List<String> getResult() {
return result;
}
- public void setResult(ArrayList<String> result) {
+ public void setResult(List<String> result) {
this.result = result;
}
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-21
11:44:22 UTC (rev 7041)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/fileUpload/examples/fileUpload.xhtml 2008-03-21
12:23:15 UTC (rev 7042)
@@ -1,10 +1,11 @@
<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:fileUpload fileUploadListener="#{fileUploadBean.listener}"
maxFilesQuantity="10"/>
- </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:fileUpload fileUploadListener="#{fileUploadBean.listener}"
+ maxFilesQuantity="10" />
+ </h:form>
</ui:composition>
\ No newline at end of file
Copied: trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature (from rev
7036, trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFilteringFeatures)
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/externalSortingUsage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFilteringFeatures/externalSortingUsage.xhtml 2008-03-20
23:36:16 UTC (rev 7036)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/externalSortingUsage.xhtml 2008-03-21
12:23:15 UTC (rev 7042)
@@ -13,9 +13,9 @@
<div class="sample-container" >
- <ui:include
src="/richfaces/sortingFilteringFeatures/examples/externalMultipleSorting.xhtml"/>
+ <ui:include
src="/richfaces/sortingFeatures/examples/externalMultipleSorting.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/sortingFilteringFeatures/examples/externalMultipleSorting.xhtml"/>
+ <ui:param name="sourcepath"
value="/richfaces/sortingFeature/examples/externalMultipleSorting.xhtml"/>
</ui:include>
</div>
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/sortingUsage.xhtml
===================================================================
---
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFilteringFeatures/sortingUsage.xhtml 2008-03-20
23:36:16 UTC (rev 7036)
+++
trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature/sortingUsage.xhtml 2008-03-21
12:23:15 UTC (rev 7042)
@@ -13,9 +13,9 @@
<div class="sample-container" >
- <ui:include
src="/richfaces/sortingFilteringFeatures/examples/simpleSingleSorting.xhtml"/>
+ <ui:include
src="/richfaces/sortingFeature/examples/simpleSingleSorting.xhtml"/>
<ui:include src="/templates/include/sourceview.xhtml">
- <ui:param name="sourcepath"
value="/richfaces/sortingFilteringFeatures/examples/simpleSingleSorting.xhtml"/>
+ <ui:param name="sourcepath"
value="/richfaces/sortingFeature/examples/simpleSingleSorting.xhtml"/>
</ui:include>
</div>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml 2008-03-21
11:44:22 UTC (rev 7041)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/sortingFeature.xhtml 2008-03-21
12:23:15 UTC (rev 7042)
@@ -9,10 +9,10 @@
<ui:define name="body">
<rich:tabPanel switchType="server" styleClass="top_tab"
contentClass="content_tab" headerClass="header_tabs_class"
inactiveTabClass="inactive_tab" activeTabClass="active_tab">
<rich:tab label="Built-in Sorting Feature">
- <ui:include
src="/richfaces/sortingFilteringFeatures/sortingUsage.xhtml"/>
+ <ui:include src="/richfaces/sortingFeature/sortingUsage.xhtml"/>
</rich:tab>
<rich:tab label="External Sorting">
- <ui:include
src="/richfaces/sortingFilteringFeatures/externalSortingUsage.xhtml"/>
+ <ui:include
src="/richfaces/sortingFeature/externalSortingUsage.xhtml"/>
</rich:tab>
</rich:tabPanel>
</ui:define>