Author: ayanul
Date: 2008-03-11 09:21:56 -0400 (Tue, 11 Mar 2008)
New Revision: 6685
Modified:
trunk/test-applications/facelets/src/main/java/combobox/Combobox.java
trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java
trunk/test-applications/facelets/src/main/java/sortingAndFiltering/SortingAndFiltering.java
trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml
trunk/test-applications/facelets/src/main/webapp/ProgressBar/ProgressBar.xhtml
trunk/test-applications/facelets/src/main/webapp/SortingAndFiltering/SortingAndFiltering.xhtml
trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
Log:
+ update FileUpload
+ update Combobox
Modified: trunk/test-applications/facelets/src/main/java/combobox/Combobox.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/combobox/Combobox.java 2008-03-11
13:10:18 UTC (rev 6684)
+++ trunk/test-applications/facelets/src/main/java/combobox/Combobox.java 2008-03-11
13:21:56 UTC (rev 6685)
@@ -9,6 +9,10 @@
import util.data.Data;
+/**
+ * @author AYanul
+ *
+ */
public class Combobox {
public boolean disabled;
public String defaultLabel;
@@ -16,7 +20,7 @@
public String hideDelay;
public boolean directInputSuggestions;
public boolean immediate;
- public int inputSize;
+ public String inputSize;
public String width;
public String value;
public int tabindex;
@@ -40,7 +44,7 @@
this.hideDelay = "100";
this.directInputSuggestions = true;
this.immediate = false;
- this.inputSize = 4;
+ this.inputSize = "4";
this.width = "300";
this.value = "";
this.tabindex = 2;
@@ -115,14 +119,6 @@
this.immediate = immediate;
}
- public int getInputSize() {
- return inputSize;
- }
-
- public void setInputSize(int inputSize) {
- this.inputSize = inputSize;
- }
-
public String getWidth() {
return width;
}
@@ -242,4 +238,13 @@
public void setListWidth(String listWidth) {
this.listWidth = listWidth;
}
+
+ public String getInputSize() {
+ return inputSize;
+ }
+
+ public void setInputSize(String inputSize) {
+ this.inputSize = inputSize;
+ }
+
}
Modified: trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java
===================================================================
--- trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java 2008-03-11
13:10:18 UTC (rev 6684)
+++ trunk/test-applications/facelets/src/main/java/fileUpload/FileUpload.java 2008-03-11
13:21:56 UTC (rev 6685)
@@ -3,10 +3,9 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
-import java.io.InputStream;
-import java.util.HashMap;
-import java.util.Map;
+import java.util.ArrayList;
+
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
@@ -15,17 +14,20 @@
private boolean autoclear;
private boolean rendered;
private boolean required;
+ private String acceptedTypes;
private String requiredMessage;
private String listHeight;
private String listWidth;
- private Map<String, InputStream> data = new HashMap<String, InputStream>();
+ private ArrayList data;
private Integer maxFilesQuantity;
public FileUpload() {
+ data = new ArrayList();
disabled = false;
autoclear = false;
rendered = true;
required = false;
+ acceptedTypes = "*";
requiredMessage = "requiredMessage";
listHeight = "200px";
listWidth = "150px";
@@ -40,7 +42,6 @@
ByteArrayOutputStream b = new ByteArrayOutputStream();
b.write(upload.getData());
}
-
}
public boolean isDisabled() {
@@ -107,8 +108,19 @@
this.listWidth = listWidth;
}
- public void setData(Map<String, InputStream> data) {
+ public String getAcceptedTypes() {
+ return acceptedTypes;
+ }
+
+ public void setAcceptedTypes(String acceptedTypes) {
+ this.acceptedTypes = acceptedTypes;
+ }
+
+ public ArrayList getData() {
+ return data;
+ }
+
+ public void setData(ArrayList data) {
this.data = data;
}
-
}
Modified:
trunk/test-applications/facelets/src/main/java/sortingAndFiltering/SortingAndFiltering.java
===================================================================
---
trunk/test-applications/facelets/src/main/java/sortingAndFiltering/SortingAndFiltering.java 2008-03-11
13:10:18 UTC (rev 6684)
+++
trunk/test-applications/facelets/src/main/java/sortingAndFiltering/SortingAndFiltering.java 2008-03-11
13:21:56 UTC (rev 6685)
@@ -19,11 +19,13 @@
private String currentSortOrder;
private String filterInput;
private String filterValue;
+
private final Comparator<Data> comparator = new Comparator<Data> () {
public int compare(Data o1, Data o2) {
- return o2.getStr1().length() - o1.getStr1().length();
+ return o1.getStr1().length() - o2.getStr1().length();
}
};
+
public String getFilterValue() {
return filterValue;
}
Modified: trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml 2008-03-11
13:10:18 UTC (rev 6684)
+++
trunk/test-applications/facelets/src/main/webapp/FileUpload/FileUpload.xhtml 2008-03-11
13:21:56 UTC (rev 6685)
@@ -2,17 +2,16 @@
<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="FileUploadSubviewID">
<rich:fileUpload id="fileUploadID"
disabled="#{fileUpload.disabled}" autoclear="#{fileUpload.autoclear}"
required="#{fileUpload.required}"
requiredMessage="#{fileUpload.requiredMessage}"
rendered="#{fileUpload.rendered}"
-listHeight="#{fileUpload.listHeight}"
listWidth="#{fileUpload.listHeight}" data="#{fileUpload.data}"
+listHeight="#{fileUpload.listHeight}"
listWidth="#{fileUpload.listHeight}" uploadData="#{fileUpload.data}"
maxFilesQuantity="#{fileUpload.maxFilesQuantity}"
fileUploadListener="#{fileUpload.fileUploadListener}">
- <f:facet name="progress">
- <rich:progressBar style="height: 5px; width: 250px;">
- </rich:progressBar>
- </f:facet>
<f:facet name="label">
<h:outputText value="{_KB}KB from {KB}KB uploaded :[ {mm}:{ss}
]"></h:outputText>
</f:facet>
</rich:fileUpload>
<h:panelGrid columns="2">
+ <h:outputText value="acceptedTypes"></h:outputText>
+ <h:inputText value="#{fileUpload.acceptedTypes}"
onchange="submit();"></h:inputText>
+
<h:outputText value="listHeight"></h:outputText>
<h:inputText value="#{fileUpload.listHeight}"
onchange="submit();"></h:inputText>
Modified: trunk/test-applications/facelets/src/main/webapp/ProgressBar/ProgressBar.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/ProgressBar/ProgressBar.xhtml 2008-03-11
13:10:18 UTC (rev 6684)
+++
trunk/test-applications/facelets/src/main/webapp/ProgressBar/ProgressBar.xhtml 2008-03-11
13:21:56 UTC (rev 6685)
@@ -1,12 +1,11 @@
<f:subview
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich" id="progressBarSubviewID">
-<rich:panelMenu>
-<rich:panelMenuItem>
+
<rich:progressBar id="progressBarID" value="#{progressBar.value}"
style="width: 450px; height: 19px;#{style.style};"
completeClass="#{style.completeClass}"
finishClass="#{style.finishClass}"
initialClass="#{style.initialClass}"
remainClass="#{style.remainClass}" styleClass="#{style.styleClass}"
mode="#{progressBar.mode}" enabled="#{progressBar.enabled}"
actionListener="#{progressBar.actionListener}"
- interval="#{progressBar.interval}" action="#{progressBar.action}"
+ interval="#{progressBar.interval}"
maxValue="#{progressBar.maxValue}"
minValue="#{progressBar.minValue}"
rendered="#{progressBar.rendered}"
reRender="loadInfoPBID,valuePBID"
progressVar="progressVar" parameters="params:'%'"
@@ -27,19 +26,19 @@
<h:outputText value="Process completed"></h:outputText>
</f:facet>
<h:outputText
- value="{minValue} {params} / {value} {params}/ {maxValue}
{params}"></h:outputText>
+ value="{progressVar} | {minValue} {params} / {value} {params}/ {maxValue}
{params}"></h:outputText>
<h:outputText id="loadInfoPBID"
value="[Load: #{progressBar.loadInfo}] " />
<h:graphicImage value="/pics/ajax_process.gif" />
</rich:progressBar>
- </rich:panelMenuItem>
- </rich:panelMenu>
+
<f:verbatim>
<br />
</f:verbatim>
+
<h:outputText
- value="[parameters=params:'%'], [{minValue} {params} / {value} {params}/
{maxValue} {params}]" />
+ value="[parameters=params:'%'], [{progressVar} | {minValue} {params} /
{value} {params}/ {maxValue} {params}]" />
<h:panelGrid columns="1">
<a4j:commandButton value="getValue"
onclick="alert($('formID:progressBarSubviewID:progressBarID').component.getValue())"></a4j:commandButton>
Modified:
trunk/test-applications/facelets/src/main/webapp/SortingAndFiltering/SortingAndFiltering.xhtml
===================================================================
---
trunk/test-applications/facelets/src/main/webapp/SortingAndFiltering/SortingAndFiltering.xhtml 2008-03-11
13:10:18 UTC (rev 6684)
+++
trunk/test-applications/facelets/src/main/webapp/SortingAndFiltering/SortingAndFiltering.xhtml 2008-03-11
13:21:56 UTC (rev 6685)
@@ -37,7 +37,6 @@
<h:outputText value=" filterExpression='data >
filterValue"></h:outputText>
</h:panelGrid>
<h:panelGrid columns="1" title="7">
- <h:outputText
value="filterValue='/pics/error.gif'"></h:outputText>
</h:panelGrid>
<h:panelGrid columns="1" title="8">
<h:outputText value="filterBy" />
@@ -46,7 +45,7 @@
<h:outputText value="sortBy"></h:outputText>
</h:panelGrid>
</h:panelGrid>
- <rich:dataTable id="dataTableSAFID"
value="#{sortingAndFiltering.data}" var="data">
+ <rich:dataTable id="dataTableSAFID"
value="#{sortingAndFiltering.data}" var="data"
sortMode="#{sortingAndFiltering.sortMode}">
<rich:column sortBy="#{data.int0}"
selfSorted="#{sortingAndFiltering.selfSorted}"
sortOrder="#{sortingAndFiltering.sortOrder}"
filterBy="#{data.int0}">
<f:facet name="header">
@@ -104,7 +103,7 @@
<h:outputText value="#6" />
</f:facet>
</rich:column>
- <rich:column filterValue="/pics/error.gif">
+ <rich:column>
<f:facet name="header">
<h:outputText value="#7" />
</f:facet>
Modified: trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-03-11 13:10:18
UTC (rev 6684)
+++ trunk/test-applications/facelets/src/main/webapp/WEB-INF/web.xml 2008-03-11 13:21:56
UTC (rev 6685)
@@ -43,6 +43,14 @@
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
+ <init-param>
+ <param-name>createTempFiles</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ <init-param>
+ <param-name>maxRequestSize</param-name>
+ <param-value>143482880</param-value>
+ </init-param>
</filter>
<filter-mapping>
<filter-name>ajax4jsf</filter-name>