Author: ayanul
Date: 2008-03-05 07:20:31 -0500 (Wed, 05 Mar 2008)
New Revision: 6556
Modified:
trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java
trunk/test-applications/jsp/src/main/java/pickList/PickList.java
trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp
trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp
trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
Log:
+fix FileUpload
Modified: trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java 2008-03-05
11:46:13 UTC (rev 6555)
+++ trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java 2008-03-05
12:20:31 UTC (rev 6556)
@@ -8,6 +8,7 @@
import java.util.Map;
import org.richfaces.event.UploadEvent;
+import org.richfaces.model.UploadItem;
public class FileUpload {
private boolean disabled;
@@ -32,11 +33,12 @@
}
public void fileUploadListener(UploadEvent event) throws IOException{
- if (event.isFile()) {
- File file = event.getFile();
+ UploadItem upload = event.getUploadItem();
+ if (upload.isFile()) {
+ File file = upload.getFile();
} else {
ByteArrayOutputStream b = new ByteArrayOutputStream();
- b.write(event.getData());
+ b.write(upload.getData());
}
}
Modified: trunk/test-applications/jsp/src/main/java/pickList/PickList.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-03-05 11:46:13
UTC (rev 6555)
+++ trunk/test-applications/jsp/src/main/java/pickList/PickList.java 2008-03-05 12:20:31
UTC (rev 6556)
@@ -7,6 +7,8 @@
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
+import util.data.Data;
+
public class PickList {
public String copyAllControlLabel;
public String copyControlLabel;
@@ -80,7 +82,7 @@
this.requiredMessage = "requiredMessage";
data = new ArrayList<SelectItem>();
for (int i = 0; i < 10; i++)
- data.add(new SelectItem("selectItems " + i));
+ data.add(new SelectItem(new Data("selectItems " + i)));
}
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp 2008-03-05
11:46:13 UTC (rev 6555)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceInput/InplaceInput.jsp 2008-03-05
12:20:31 UTC (rev 6556)
@@ -24,7 +24,7 @@
rendered="#{inplaceInput.rendered}"
immediate="#{inplaceInput.immediate}">
</rich:inplaceInput>
- are easy to exploit. <h:commandButton
value="ok"></h:commandButton>
+ are easy to exploit.
<h:panelGrid columns="2">
<a4j:commandButton value="refresh"
reRender="inplaceInputValueCLID"></a4j:commandButton>
<h:outputText id="inplaceInputValueCLID"
Modified: trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp 2008-03-05
11:46:13 UTC (rev 6555)
+++ trunk/test-applications/jsp/src/main/webapp/InplaceSelect/InplaceSelect.jsp 2008-03-05
12:20:31 UTC (rev 6556)
@@ -103,5 +103,5 @@
<h:outputText value="openOnEdit"></h:outputText>
<h:selectBooleanCheckbox value="#{inplaceSelect.openOnEdit}"
onchange="submit();"></h:selectBooleanCheckbox>
- </h:panelGrid><h:commandButton
value="ok"></h:commandButton>
+ </h:panelGrid>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-03-05 11:46:13 UTC
(rev 6555)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/web.xml 2008-03-05 12:20:31 UTC
(rev 6556)
@@ -18,6 +18,10 @@
<param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name>
<param-value>false</param-value>
</context-param>
+ <context-param>
+ <param-name>org.richfaces.CONTROL_SKINNING_CLASSES</param-name>
+ <param-value>enable</param-value>
+ </context-param>
<filter>
<display-name>Ajax4jsf Filter</display-name>
<filter-name>ajax4jsf</filter-name>
Show replies by date