Author: ilya_shaikovsky
Date: 2008-03-18 12:25:12 -0400 (Tue, 18 Mar 2008)
New Revision: 6918
Removed:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/dataTableScroller/SortingBean.java
Log:
Deleted:
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/dataTableScroller/SortingBean.java
===================================================================
---
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/dataTableScroller/SortingBean.java 2008-03-18
16:19:33 UTC (rev 6917)
+++
trunk/samples/richfaces-demo/src/main/java/org/richfaces/demo/dataTableScroller/SortingBean.java 2008-03-18
16:25:12 UTC (rev 6918)
@@ -1,189 +0,0 @@
-/**
- *
- */
-package org.richfaces.demo.dataTableScroller;
-
-import java.util.ArrayList;
-
-import javax.faces.model.SelectItem;
-
-/**
- * @author Ilya Shaikovsky
- *
- */
-public class SortingBean {
- SelectItem[] sortByItems = new SelectItem[5];
- SelectItem[] sortDirectionItems = new SelectItem[3];
- private int firstSortOption=0;
- private int secondSortOption=0;
- private int thirdSortOption=0;
- private int fourthSortOption=0;
- private boolean modelSorted;
- private boolean makeSorted;
- private boolean priceSorted;
- private boolean mileageSorted;
- private String modelDirection = "UNSORTED";
- private String makeDirection = "UNSORTED";
- private String priceDirection = "UNSORTED";
- private String mileageDirection = "UNSORTED";
- ArrayList<String> prioritList = new ArrayList<String>();
-
- public SortingBean() {
- sortByItems[0] = new SelectItem(0,"None");
- sortByItems[1] = new SelectItem(1,"Model");
- sortByItems[2] = new SelectItem(2,"Price");
- sortByItems[3] = new SelectItem(3,"Make");
- sortByItems[4] = new SelectItem(4,"Mileage");
-
- sortDirectionItems[0] = new SelectItem("None");
- sortDirectionItems[1] = new SelectItem("Asc");
- sortDirectionItems[2] = new SelectItem("Desc");
- }
-
- public void checkSort(int value){
- switch (value) {
- case 1:
- prioritList.add("model");
- setModelDirection("ASCENDING");
- setModelSorted(true);
- break;
- case 2:
- prioritList.add("price");
- setPriceDirection("ASCENDING");
- setPriceSorted(true);
- break;
- case 3:
- prioritList.add("make");
- setMakeDirection("ASCENDING");
- setMakeSorted(true);
- break;
- case 4:
- prioritList.add("mileage");
- setMileageDirection("ASCENDING");
- setMileageSorted(true);
- break;
- }
-
- }
-
- public String changeSorting() {
- prioritList.clear();
- setModelSorted(false); setModelDirection("UNSORTED");
- setMakeSorted(false); setMakeDirection("UNSORTED");
- setPriceSorted(false); setPriceDirection("UNSORTED");
- setMileageSorted(false);setMileageDirection("UNSORTED");
- checkSort(firstSortOption);
- checkSort(secondSortOption);
- checkSort(thirdSortOption);
- checkSort(fourthSortOption);
- return null;
- }
-
- public SelectItem[] getSortByItems() {
- return sortByItems;
- }
-
- public SelectItem[] getSortDirectionItems() {
- return sortDirectionItems;
- }
-
- public boolean isModelSorted() {
- return modelSorted;
- }
-
- public void setModelSorted(boolean modelSorted) {
- this.modelSorted = modelSorted;
- }
-
- public boolean isMakeSorted() {
- return makeSorted;
- }
-
- public void setMakeSorted(boolean makeSorted) {
- this.makeSorted = makeSorted;
- }
-
- public boolean isPriceSorted() {
- return priceSorted;
- }
-
- public void setPriceSorted(boolean priceSorted) {
- this.priceSorted = priceSorted;
- }
-
- public boolean isMileageSorted() {
- return mileageSorted;
- }
-
- public void setMileageSorted(boolean mileageSorted) {
- this.mileageSorted = mileageSorted;
- }
-
- public ArrayList<String> getPrioritList() {
- return prioritList;
- }
-
- public String getModelDirection() {
- return modelDirection;
- }
-
- public void setModelDirection(String modelDirection) {
- this.modelDirection = modelDirection;
- }
-
- public String getMakeDirection() {
- return makeDirection;
- }
-
- public void setMakeDirection(String makeDirection) {
- this.makeDirection = makeDirection;
- }
-
- public String getPriceDirection() {
- return priceDirection;
- }
-
- public void setPriceDirection(String priceDirection) {
- this.priceDirection = priceDirection;
- }
-
- public String getMileageDirection() {
- return mileageDirection;
- }
-
- public void setMileageDirection(String mileageDirection) {
- this.mileageDirection = mileageDirection;
- }
-
- public int getFirstSortOption() {
- return firstSortOption;
- }
-
- public void setFirstSortOption(int firstSortOption) {
- this.firstSortOption = firstSortOption;
- }
-
- public int getSecondSortOption() {
- return secondSortOption;
- }
-
- public void setSecondSortOption(int secondSortOption) {
- this.secondSortOption = secondSortOption;
- }
-
- public int getThirdSortOption() {
- return thirdSortOption;
- }
-
- public void setThirdSortOption(int thirdSortOption) {
- this.thirdSortOption = thirdSortOption;
- }
-
- public int getFourthSortOption() {
- return fourthSortOption;
- }
-
- public void setFourthSortOption(int fourthSortOption) {
- this.fourthSortOption = fourthSortOption;
- }
-}
Show replies by date