JBoss Rich Faces SVN: r5826 - trunk/test-applications/jsp/src/main/webapp/DataScroller.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-02-05 11:04:56 -0500 (Tue, 05 Feb 2008)
New Revision: 5826
Modified:
trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
Log:
http://jira.jboss.com/jira/browse/RF-1893
Modified: trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-02-05 15:44:30 UTC (rev 5825)
+++ trunk/test-applications/jsp/src/main/webapp/DataScroller/DataScroller.jsp 2008-02-05 16:04:56 UTC (rev 5826)
@@ -7,9 +7,9 @@
<h:dataTable id="dataTableId" value="#{dataScroller.dataTable}"
var="dT" cellpadding="5px" rows="5" border="1">
<f:facet name="header">
- <rich:datascroller fastControls="#{dataScroller.fastControls}"
+ <rich:datascroller reRender="dataTableId" fastControls="#{dataScroller.fastControls}"
align="#{dataScroller.align}" rendered="#{dataScroller.render}"
- limitToList="#{dataScroller.limitToList}"
+ limitToList="#{dataScroller.limitToList}"
renderIfSinglePage="#{dataScroller.renderIfSinglePage}"
maxPages="#{dataScroller.maxPages}"
scrollerListener="#{dataScroller.ScrollerListener}"
16 years, 3 months
JBoss Rich Faces SVN: r5825 - in trunk/sandbox/samples/fileUploadDemo/src/main: webapp and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-05 10:44:30 -0500 (Tue, 05 Feb 2008)
New Revision: 5825
Added:
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
Removed:
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.xhtml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp
Modified:
trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp
Log:
demo site refactoring
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-05 15:37:21 UTC (rev 5824)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-05 15:44:30 UTC (rev 5825)
@@ -21,10 +21,12 @@
package org.richfaces;
-import java.io.IOException;
+import java.io.ByteArrayOutputStream;
import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
-import org.richfaces.org.jboss.seam.ui.component.UIFileUpload;
+import javax.faces.event.ActionEvent;
/**
* @author $Autor$
@@ -32,33 +34,41 @@
*/
public class Bean {
- private UIFileUpload fileUpload;
+ private Map<String,InputStream> data = new HashMap<String, InputStream>();
+
+ public void action(ActionEvent event) {
+ try {
+ if (data != null) {
+ for (String name : data.keySet()) {
+ System.out.println("\nFile Name : " + name);
+ InputStream stream = data.get(name);
+ byte[] buffer = new byte[4096];
+ ByteArrayOutputStream b = new ByteArrayOutputStream();
+ int read;
+ while ((read = stream.read(buffer)) != -1) {
+ b.write(buffer, 0, read);
+ System.out.println(b.toString());
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.getMessage();
+ }
+ }
- public UIFileUpload getFileUpload() {
- return fileUpload;
+ /**
+ * @return the data
+ */
+ public Map<String, InputStream> getData() {
+ return data;
}
- public void setFileUpload(UIFileUpload fileUpload) {
- this.fileUpload = fileUpload;
+ /**
+ * @param data the data to set
+ */
+ public void setData(Map<String, InputStream> data) {
+ this.data = data;
}
- public void printFile() {
- int i = -1;
- int count = 0;
- InputStream stream = fileUpload.getLocalInputStream();
- if (stream != null) {
- do {
- try {
- i = stream.read();
- count++;
- } catch (IOException e) {
- // TODO Auto-generated catch block
- e.printStackTrace();
- }
- //System.out.print((char) i);
- } while (i != -1);
- System.out.println(String.format("%d bytes read", count));
- }
-
- }
+
}
\ No newline at end of file
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp 2008-02-05 15:37:21 UTC (rev 5824)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/index.jsp 2008-02-05 15:44:30 UTC (rev 5825)
@@ -5,7 +5,7 @@
<head></head>
<body>
- <jsp:forward page="/pages/index2.jsf" />
+ <jsp:forward page="/pages/index.jsf" />
</body>
</html>
\ No newline at end of file
Deleted: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-05 15:37:21 UTC (rev 5824)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-05 15:44:30 UTC (rev 5825)
@@ -1,30 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/fileUpload"
- prefix="fu"%>
-<html>
-<head>
-<title></title>
-</head>
-<body>
-<script language="javascript"><!--
-function loader_end() {
-alert("lll");
-}
-//-->
-</script>
-<div style="display: none;"><iframe name="loader"
- onload="loader_end()"></iframe></div>
-
-<f:view>
- <h:form target="loader" enctype="multipart/form-data">
- <fu:fileUpload binding="#{bean.fileUpload}"
- onclick="window.status=this.value" />
- <br />
- <h:commandButton action="#{bean.printFile}" value="Submit"></h:commandButton>
- <a4j:commandButton action="#{bean.printFile}" value="Submit"></a4j:commandButton>
- </h:form>
-</f:view>
-</body>
-</html>
Copied: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp (from rev 5815, trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp)
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp (rev 0)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-05 15:44:30 UTC (rev 5825)
@@ -0,0 +1,24 @@
+<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
+<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
+<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/fileUpload"
+ prefix="fu"%>
+<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/progressBar" prefix="progressBar" %>
+<html>
+<head>
+<title></title>
+</head>
+<body>
+<f:view>
+<h:form>
+<fu:fileUpload data="#{bean.data}">
+ <f:facet name="progress">
+ <progressBar:progressBar style="height: 10px; width: 300px;">
+ </progressBar:progressBar>
+ </f:facet>
+</fu:fileUpload><br/><br/><br/>
+<h:commandButton actionListener="#{bean.action}" style="font-weight: bold; width: 300px;" value="Print file content in console"></h:commandButton>
+</h:form>
+</f:view>
+</body>
+</html>
Deleted: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.xhtml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.xhtml 2008-02-05 15:37:21 UTC (rev 5824)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.xhtml 2008-02-05 15:44:30 UTC (rev 5825)
@@ -1,12 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:a4j="https://ajax4jsf.dev.java.net/ajax"
- xmlns:c="http://java.sun.com/jsp/jstl/core"
- >
- <f:view>
-
- </f:view>
-</html>
\ No newline at end of file
Deleted: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp 2008-02-05 15:37:21 UTC (rev 5824)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index2.jsp 2008-02-05 15:44:30 UTC (rev 5825)
@@ -1,24 +0,0 @@
-<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
-<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
-<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
-<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/fileUpload"
- prefix="fu"%>
-<%@ taglib uri="http://labs.jboss.com/jbossrichfaces/ui/ui/progressBar" prefix="progressBar" %>
-<html>
-<head>
-<title></title>
-</head>
-<body>
-<f:view>
-<h:form>
-<fu:fileUpload>
- <f:facet name="progress">
- <progressBar:progressBar style="height: 10px; width: 300px;">
- </progressBar:progressBar>
- </f:facet>
-</fu:fileUpload><br/>
-<h:commandButton value="Submit"></h:commandButton>
-</h:form>
-</f:view>
-</body>
-</html>
16 years, 3 months
JBoss Rich Faces SVN: r5824 - in trunk/sandbox/ui/fileUpload/src/main: java/org/richfaces/org/jboss/seam/ui/component and 3 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-05 10:37:21 -0500 (Tue, 05 Feb 2008)
New Revision: 5824
Added:
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
Removed:
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload2.jspx
trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload3.jspx
Modified:
trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/FileItem.java
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java
trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java
trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
next portion of functionality
Modified: trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-02-05 15:37:21 UTC (rev 5824)
@@ -43,7 +43,7 @@
</test>
<renderer generate="true" override="true">
<name>org.richfaces.renderkit.html.FileUploadRenderer</name>
- <template>org/richfaces/fileUpload3.jspx</template>
+ <template>org/richfaces/fileUpload.jspx</template>
</renderer>
<tag>
<name>fileUpload</name>
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/FileItem.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/FileItem.java 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/FileItem.java 2008-02-05 15:37:21 UTC (rev 5824)
@@ -6,6 +6,7 @@
package org.richfaces.org.jboss.seam.ui.component;
+import java.io.Serializable;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -14,8 +15,10 @@
* @author "Andrey Markavtsov"
*
*/
-public class FileItem {
+public class FileItem implements Serializable{
+ private static final long serialVersionUID = 42L;
+
/** Defines list of statuses available */
public static enum Status {ADDED, MARKED_4_UPLOAD, IN_PROGRESS, UPLOADED, CANCELLED};
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/component/UIFileUpload.java 2008-02-05 15:37:21 UTC (rev 5824)
@@ -4,7 +4,9 @@
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
+import java.util.Map;
import javax.el.ValueExpression;
import javax.faces.component.UIComponent;
@@ -30,7 +32,7 @@
private String localFileName;
private Integer localFileSize;
-
+
private InputStream localInputStream;
private List<FileItem> fileItems;
@@ -38,59 +40,59 @@
private UIComponent progressBar;
- @Override
- public void processUpdates(FacesContext context) {
- ValueExpression dataBinding = getValueExpression("data");
- if (dataBinding != null) {
- Class clazz = dataBinding.getType(context.getELContext());
- if (clazz.isAssignableFrom(InputStream.class)) {
- dataBinding.setValue(context.getELContext(),
- getLocalInputStream());
- } else if (clazz.isAssignableFrom(byte[].class)) {
- byte[] bytes = null;
- if (getLocalInputStream() != null) {
- ByteArrayOutputStream bos = new ByteArrayOutputStream();
- try {
- byte[] buffer = new byte[512];
- int read = getLocalInputStream().read(buffer);
- while (read != -1) {
- bos.write(buffer, 0, read);
- read = getLocalInputStream().read(buffer);
- }
- bytes = bos.toByteArray();
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }
- dataBinding.setValue(context.getELContext(), bytes);
- }
+// @Override
+// public void processUpdates(FacesContext context) {
+// ValueExpression dataBinding = getValueExpression("data");
+// if (dataBinding != null) {
+// Class clazz = dataBinding.getType(context.getELContext());
+// if (clazz.isAssignableFrom(InputStream.class)) {
+// dataBinding.setValue(context.getELContext(),
+// getLocalInputStream());
+// } else if (clazz.isAssignableFrom(byte[].class)) {
+// byte[] bytes = null;
+// if (getLocalInputStream() != null) {
+// ByteArrayOutputStream bos = new ByteArrayOutputStream();
+// try {
+// byte[] buffer = new byte[512];
+// int read = getLocalInputStream().read(buffer);
+// while (read != -1) {
+// bos.write(buffer, 0, read);
+// read = getLocalInputStream().read(buffer);
+// }
+// bytes = bos.toByteArray();
+// } catch (IOException e) {
+// throw new RuntimeException(e);
+// }
+// }
+// dataBinding.setValue(context.getELContext(), bytes);
+// }
+//
+// if (getLocalContentType() != null) {
+// ValueExpression valueExpression = getValueExpression("contentType");
+// if (valueExpression != null) {
+// valueExpression.setValue(context.getELContext(),
+// getLocalContentType());
+// }
+// }
+//
+// if (getLocalFileName() != null) {
+// ValueExpression valueExpression = getValueExpression("fileName");
+// if (valueExpression != null) {
+// valueExpression.setValue(context.getELContext(),
+// getLocalFileName());
+// }
+// }
+//
+// if (getLocalFileSize() != null) {
+// ValueExpression valueExpression = getValueExpression("fileSize");
+// if (valueExpression != null) {
+// valueExpression.setValue(context.getELContext(),
+// getLocalFileSize());
+// }
+// }
+// }
+// }
- if (getLocalContentType() != null) {
- ValueExpression valueExpression = getValueExpression("contentType");
- if (valueExpression != null) {
- valueExpression.setValue(context.getELContext(),
- getLocalContentType());
- }
- }
-
- if (getLocalFileName() != null) {
- ValueExpression valueExpression = getValueExpression("fileName");
- if (valueExpression != null) {
- valueExpression.setValue(context.getELContext(),
- getLocalFileName());
- }
- }
-
- if (getLocalFileSize() != null) {
- ValueExpression valueExpression = getValueExpression("fileSize");
- if (valueExpression != null) {
- valueExpression.setValue(context.getELContext(),
- getLocalFileSize());
- }
- }
- }
- }
-
public String getLocalContentType() {
return localContentType;
}
@@ -186,7 +188,6 @@
values[0] = super.saveState(context);
values[1] = fileItems;
values[2] = uploadStatus;
- //values[3] = this.getFacet("progress");
return values;
}
@@ -202,9 +203,6 @@
super.restoreState(context, values[0]);
fileItems = (List<FileItem>) values[1];
uploadStatus = (String) values[2];
-// if (values[3] != null) {
-// this.getFacets().put("progress", (UIComponent)values[3]);
-// }
}
/**
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java 2008-02-05 15:37:21 UTC (rev 5824)
@@ -1,6 +1,7 @@
package org.richfaces.org.jboss.seam.ui.renderkit;
import java.io.IOException;
+import java.io.InputStream;
import java.io.Writer;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
@@ -78,12 +79,18 @@
Map<String, String[]> params = context.getExternalContext()
.getRequestParameterValuesMap();
+ AjaxContext ajaxContext = AjaxContextImpl
+ .getCurrentInstance(context);
+
+ if (!ajaxContext.isAjaxRequest() && !(request instanceof MultipartRequest)) {
+ fileUpload.getFileItems().clear();
+ fileUpload.setUploadStatus(UIFileUpload.READY);
+ }
+
new AjaxEvent(component).queue();
if (params.containsKey(getActionParameterName(clientId))) {
processEvents(context, component, clientId);
- AjaxContext ajaxContext = AjaxContextImpl
- .getCurrentInstance(context);
ajaxContext.addComponentToAjaxRender(component);
}
if (!(request instanceof MultipartRequest)) {
@@ -104,6 +111,19 @@
}
}
+
+ private void storeData(FacesContext context, UIFileUpload fileUpload) {
+ ValueExpression data = fileUpload.getValueExpression("data");
+ if (data != null) {
+ Class clazz = data.getType(context.getELContext());
+ if (clazz.isAssignableFrom(Map.class)) {
+ Map map = (Map)data.getValue(context.getELContext());
+ map.put(fileUpload.getLocalFileName(),fileUpload.getLocalInputStream());
+ map.isEmpty();
+ }
+ }
+
+ }
public void encodeControlsMarkup(FacesContext context, UIComponent component)
throws IOException {
@@ -143,6 +163,7 @@
}
}
fileUpload.setUploadStatus(UIFileUpload.READY);
+ storeData(context, fileUpload);
}
private FileItem getFileByName(UIFileUpload fileUpload, String name) {
@@ -249,6 +270,7 @@
item.setStatus(FileItem.Status.CANCELLED);
}
}
+ fileUpload.setUploadStatus(UIFileUpload.READY);
}
}
Modified: trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-02-05 15:37:21 UTC (rev 5824)
@@ -58,14 +58,19 @@
}
},
onFileUploaded: function (ev) {
+ var o = $(this.id + ":1");
+ if (o) {
+ o.disabled = true;
+ o.name = "done";
+ o.id = o.name;
+ }
var formId = FileUpload.Uploaders[this.id]['formId'];
var containerId = FileUpload.Uploaders[this.id]['containerId'];
var actionUrl = FileUpload.Uploaders[this.id]['actionUrl'];
var f = {};
f[this.id] = this.id;
f[this.id + "_action"] = "upload";
- A4J.AJAX.StopPoll(formId + ":progressBar");
- //new ProgressBar(formId + ":progressBar").setValue(100);
+ new ProgressBar(formId + ":progressBar").disable();
A4J.AJAX.Submit(containerId,formId,ev,{'parameters':f ,'actionUrl':actionUrl} );
},
createForm: function () {
@@ -111,7 +116,8 @@
},
stop: function () {
new ProgressBar(FileUpload.Uploaders[this.id]['formId']+":progressBar").disable();
- this.fm.reset();
+ var fr = $(this.id + ":fr");
+ fr.src = "about:blank";
var f = $(this.id + ":1");
if (f) {
f.disable = true;
Deleted: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-05 15:37:21 UTC (rev 5824)
@@ -1,125 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:h=" http://ajax4jsf.org/cdk/headers"
- class="org.richfaces.renderkit.html.FileUploadRenderer"
- baseclass="org.richfaces.org.jboss.seam.ui.renderkit.FileUploadRendererBase"
- component="org.richfaces.org.jboss.seam.ui.component.UIFileUpload"
- >
- <h:styles>
- /org/richfaces/renderkit/html/css/fileUpload.xcss
- </h:styles>
-
- <h:scripts>
- new org.ajax4jsf.javascript.PrototypeScript(),
- new org.ajax4jsf.javascript.AjaxScript(),
- /org/richfaces/renderkit/html/js/FileUpload.js,
- </h:scripts>
-
- <f:resource
- name="/org/richfaces/renderkit/html/images/ico_file_32.gif" var="icon" />
-
-<jsp:scriptlet>
- <![CDATA[
- variables.setVariable("url",getActionUrl(context));
-]]>
-</jsp:scriptlet>
-
-<f:clientId var="clientId" />
-
-<div class="upload_list_width upload_list_decor" id="#{clientId}">
-
- <input type="hidden" name="fileName" id="#{clientId}:fileName" />
- <input type="hidden" name="status" id="#{clientId}:status" value="#{this:encodeStatus(component)}" />
-
- <div class="upload_list_width upload_list_overflow">
- <table border="0" cellpadding="0" cellspacing="0" width="100%" id="#{clientId}:upload_table">
- <jsp:scriptlet>
- <![CDATA[
- Iterator<org.richfaces.org.jboss.seam.ui.component.FileItem> it = component.getFileItems().iterator();
- while (it.hasNext()) {
- org.richfaces.org.jboss.seam.ui.component.FileItem item = it.next();
- String fileName = item.getFullFileName();
- String fileNameJs = convertFileName(item.getFullFileName());
- variables.setVariable("fileName",fileName);
- variables.setVariable("fileNameJs",fileNameJs);
- ]]>
- </jsp:scriptlet>
- <tr>
- <td>
- <div class="upload_font upload_icon"><img src="#{icon}" width="32" height="32" alt="" border="0" /></div>
- </td>
- <td>
- <div class="upload_font upload_name">
- #{fileName}
- </div>
-
- <div class="upload_font upload_name">
- <jsp:scriptlet>
- <![CDATA[
- encodeFileItemStatus(context,component,item);
- ]]>
- </jsp:scriptlet>
- </div>
-
- </td>
- <td>
- <div class="upload_font upload_del"><a href="#" onclick="new FileUpload('#{clientId}').clear('#{fileNameJs}'); #{this:getActionOnClick(context,component,'CLEAR','false')}; return false;"
- class="upload_anc">Delete</a></div>
- <div class="upload_font upload_del"><a href="#" class="upload_anc" onclick="new FileUpload('#{clientId}').beforeUploadFile('#{fileNameJs}'); #{this:getActionOnClick(context,component,'UPLOAD','true')}; return false;">Upload</a></div>
- </td>
- <td>
- <div class="upload_font upload_scroll"></div>
- </td>
- </tr>
- <jsp:scriptlet>
- <![CDATA[
- }
- ]]>
- </jsp:scriptlet>
- </table>
- </div>
- <a href="#" onclick="new FileUpload('#{clientId}').test(event);">crack</a>
- <div class="upload_list_width upload_footer_decor">
- <table border="0" cellpadding="0" cellspacing="0" id="upload_footer" style="width: 100%">
- <tr>
- <td class="upload_footer_firstcol" style="width: 40px; position: relative; text-align: left;">
- <div style="overflow: hidden; left: 7px; direction: rtl; position: relative; width: 48px;">
- <input value="...Add" type="Button" class="upload_btn_over upload_font" onmouseover="this.className='upload_btn_over upload_font'" onmouseout="this.className='upload_btn_over upload_font'" onmousedown="this.className='upload_btn_press upload_font'"
- style="position: relative; width: 40px; top: 0px" />
- <input type="file"
- style="cursor: pointer; z-index: 3; left: 0px; height: 30px; position: absolute; top: 0px"
- class="hidden"
- onchange="new FileUpload('#{clientId}').addFile(this); #{this:getActionOnClick(context,component,'ADD','false')}; return false;" />
- </div>
- </td>
- <td style="position: relative; text-align: left; padding-left: 7px;">
- <input style="padding-left : 10; padding-right : 10; font-weight : bold" value="Upload" type="Button" class="upload_btn_over upload_font"
- onmouseover="this.className='upload_btn_over upload_font'"
- onmouseout="this.className='upload_btn_over upload_font'"
- onmousedown="this.className='upload_btn_press upload_font'"
- onclick="new FileUpload('#{clientId}').uploadAll(); return false;" />
-
- </td>
- <td style="position: relative; text-align: right; width: 10px">
- <div class="upload_font upload_footer_del">
- <input value="Clear" type="Button" class="upload_btn_over upload_font" onmouseover="this.className='upload_btn_over upload_font'" onmouseout="this.className='upload_btn_over upload_font'"
- onmousedown="this.className='upload_btn_press upload_font'"
- onclick="new FileUpload('#{clientId}').clearAll(); #{this:getActionOnClick(context,component,'CLEARALL','false')}; return false;" />
- </div>
- </td>
- <td>
- <div class="upload_font upload_scroll">
- </div>
- </td>
- </tr>
- </table>
- </div>
- <script>
- new FileUpload('#{clientId}').init('#{url}');
- </script>
-</div>
-</f:root>
-
-
-
\ No newline at end of file
Copied: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx (from rev 5814, trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload3.jspx)
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx (rev 0)
+++ trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload.jspx 2008-02-05 15:37:21 UTC (rev 5824)
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<f:root
+ xmlns:f="http://ajax4jsf.org/cdk/template"
+ xmlns:h=" http://ajax4jsf.org/cdk/headers"
+ class="org.richfaces.renderkit.html.FileUploadRenderer"
+ baseclass="org.richfaces.org.jboss.seam.ui.renderkit.FileUploadRendererBase"
+ component="org.richfaces.org.jboss.seam.ui.component.UIFileUpload"
+ >
+ <h:styles>
+ /org/richfaces/renderkit/html/css/fileUpload.xcss,
+ /org/richfaces/renderkit/html/css/progressBar.xcss
+ </h:styles>
+
+ <h:scripts>
+ new org.ajax4jsf.javascript.PrototypeScript(),
+ new org.ajax4jsf.javascript.AjaxScript(),
+ /org/richfaces/renderkit/html/scripts/utils.js,
+ /org/richfaces/renderkit/html/scripts/json/json-dom.js,
+ /org/richfaces/renderkit/html/js/FileUpload.js,
+ /org/richfaces/renderkit/html/js/progressBar.js,
+ </h:scripts>
+
+ <f:clientId var="clientId" />
+
+<div class="upload_list_width upload_list_decor" id="#{clientId}">
+
+ <table class="upload_toolbar_decor">
+ <tr>
+ <td>
+ <div class="upload_button_border" style=" float:left;">
+ <div class="upload_button upload_font" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'" onmouseout="this.className='upload_button upload_font'"
+ style="position: relative; overflow: hidden; direction: rtl; width:70px">
+ <div class="upload_button_content upload_font upload_ico upload_ico_add" style="">Add...</div>
+ <input type="file" style="cursor: pointer; z-index: 3; width: 0px; height: 22px; left: 0px; top: 0px; position: absolute"
+ class="hidden"
+ id="#{clientId}:file"
+ name="fileName"
+ onchange="#{this:getAddFileClick(context,component)}; return false;"/>
+ </div>
+ </div>
+ <div class="upload_button_border" style=" float:left;">
+ <div class="upload_button upload_font" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
+ onmouseout="this.className='upload_button upload_font'"
+ onclick="javascript: if ((new FileUpload('#{clientId}').getFilesCount()) > 0) { #{this:getUploadAllClick(context, component)} }">
+ <a href="#" class="upload_button_selection">
+ <div class="upload_button_content upload_font upload_ico upload_ico_start"><b>Upload</b>
+ </div>
+ </a>
+ </div>
+ </div>
+ <div class="upload_button_border" style=" float:right">
+ <div class="upload_button upload_font" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
+ onmouseout="this.className='upload_button upload_font'"
+ onclick="#{this:getClearAllClick(context, component)}">
+ <a href="#" class="upload_button_selection">
+ <div class="upload_button_content upload_font upload_ico upload_ico_clear">Clear All</div>
+ </a>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+ <div class="upload_list_width upload_list_overflow" id="#{clientId}:fileItems">
+
+ <jsp:scriptlet>
+ <![CDATA[
+ Iterator<org.richfaces.org.jboss.seam.ui.component.FileItem> it = component.getFileItems().iterator();
+ Integer i = 0;
+ while (it.hasNext()) {
+ org.richfaces.org.jboss.seam.ui.component.FileItem item = it.next();
+ String fullFileName = item.getFullFileName();
+ String fileName = item.getFileName();
+ variables.setVariable("fileName",fileName);
+ variables.setVariable("fullFileName",fullFileName);
+ variables.setVariable("n",i);
+ ]]>
+ </jsp:scriptlet>
+
+ <table border="0" cellpadding="0" cellspacing="0">
+ <tr>
+ <td class="upload_font upload_name upload_table_td">
+ <div class="upload_name_padding">
+ #{fileName}
+ </div>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ renderProgress(context, component, item);
+ ]]>
+ </jsp:scriptlet>
+ <br/>
+
+ <div class="upload_name_padding">
+ <b>
+ <jsp:scriptlet>
+ <![CDATA[
+ renderLabel(context, component, item);
+ ]]>
+ </jsp:scriptlet>
+ </b>
+ </div>
+
+
+ </td>
+ <td class="upload_table_td" style="vertical-align: center;">
+ <jsp:scriptlet>
+ <![CDATA[
+ if (isCanClear(item)) {
+ ]]>
+ </jsp:scriptlet>
+ <div class="upload_font upload_del">
+ <a href="#" class="upload_anc"
+ onmousedown="return new FileUpload().confirm(this,'Clear','text-decoration:none; color:black','#{clientId}:clear#{n}');"
+ onclick="#{this:getClearFileClick(context, component)}"
+ style="text-decoration: none; color:black">Clear</a>
+ </div>
+ <jsp:scriptlet>
+ <![CDATA[
+ } else {
+ ]]>
+ </jsp:scriptlet>
+ <div class="upload_font upload_del">
+ <a href="#" class="upload_anc"
+ onmousedown="return new FileUpload().confirm(this,'Stop','text-decoration:none; color:black','#{clientId}:stop#{n}');"
+ onclick="new FileUpload('#{clientId}').stop(); #{this:getStopFileClick(context, component)}"
+ style="text-decoration: none; color:black">Stop</a>
+ </div>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ }
+ ]]>
+ </jsp:scriptlet>
+ </td>
+ <td class="upload_table_td">
+ <div class="upload_font upload_scroll"></div>
+ </td>
+ </tr>
+ </table>
+
+ <jsp:scriptlet>
+ <![CDATA[
+ i++;
+ }
+ ]]>
+ </jsp:scriptlet>
+
+ <span>
+ <script type="text/javascript">
+ <f:call name="encodeUploadScript" />
+ </script>
+ </span>
+
+ </div>
+
+ <span>
+ <script type="text/javascript">
+ <f:call name="encodeInitialScript" />
+ </script>
+ </span>
+</div>
+
+
+</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload2.jspx
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload2.jspx 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload2.jspx 2008-02-05 15:37:21 UTC (rev 5824)
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:h=" http://ajax4jsf.org/cdk/headers"
- class="org.richfaces.renderkit.html.FileUploadRenderer"
- baseclass="org.richfaces.org.jboss.seam.ui.renderkit.FileUploadRendererBase"
- component="org.richfaces.org.jboss.seam.ui.component.UIFileUpload"
- >
- <h:styles>
- /org/richfaces/renderkit/html/css/fileUpload.xcss
- </h:styles>
-
- <h:scripts>
- new org.ajax4jsf.javascript.PrototypeScript(),
- new org.ajax4jsf.javascript.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/utils.js,
- /org/richfaces/renderkit/html/scripts/json/json-dom.js,
- /org/richfaces/renderkit/html/js/FileUpload.js,
- </h:scripts>
-
- <f:clientId var="clientId" />
-
-<div class="upload_list_width upload_list_decor" id="#{clientId}">
- <table class="upload_toolbar_decor">
- <tr>
- <td id="#{clientId}:header"></td>
- </tr>
- </table>
- <script>
-
- new FileUpload('#{clientId}').renderControl(<f:call name="encodeControlsMarkup" />,
- {'add': "<f:call name='encodeAddControl' />",
- 'upload': "<f:call name='encodeUploadControl' />",
- 'clean': "<f:call name='encodeCleanControl' />"});
- </script>
- <div class="upload_list_width upload_list_overflow">
-
- <table border="0" cellpadding="0" cellspacing="0" id="upload_table">
- <tr>
- <td class="upload_font upload_name">
- <div class="upload_name_padding">
- file_upload.html
- </div>
-
-
- <!--div class="upload_bar_exterior">
- <div class="upload_bar_shell">
- <div class="upload_bar_uploaded">
-
- </div>
- </div>
- </div-->
-
- <div class="upload_name_padding">
- <b>Done</b>
- </div>
-
-
- </td>
- <td>
- <div class="upload_font upload_del"><a href="#" class="upload_anc">Clear</a></div>
- <div class="upload_font upload_del"><br /></div>
- </td>
- <td>
- <div class="upload_font upload_scroll"></div>
- </td>
- </tr>
- </table>
- </div>
-</div>
-
-
-</f:root>
\ No newline at end of file
Deleted: trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload3.jspx
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload3.jspx 2008-02-05 15:36:33 UTC (rev 5823)
+++ trunk/sandbox/ui/fileUpload/src/main/templates/org/richfaces/fileUpload3.jspx 2008-02-05 15:37:21 UTC (rev 5824)
@@ -1,164 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<f:root
- xmlns:f="http://ajax4jsf.org/cdk/template"
- xmlns:h=" http://ajax4jsf.org/cdk/headers"
- class="org.richfaces.renderkit.html.FileUploadRenderer"
- baseclass="org.richfaces.org.jboss.seam.ui.renderkit.FileUploadRendererBase"
- component="org.richfaces.org.jboss.seam.ui.component.UIFileUpload"
- >
- <h:styles>
- /org/richfaces/renderkit/html/css/fileUpload.xcss,
- /org/richfaces/renderkit/html/css/progressBar.xcss
- </h:styles>
-
- <h:scripts>
- new org.ajax4jsf.javascript.PrototypeScript(),
- new org.ajax4jsf.javascript.AjaxScript(),
- /org/richfaces/renderkit/html/scripts/utils.js,
- /org/richfaces/renderkit/html/scripts/json/json-dom.js,
- /org/richfaces/renderkit/html/js/FileUpload.js,
- /org/richfaces/renderkit/html/js/progressBar.js,
- </h:scripts>
-
- <f:clientId var="clientId" />
-
-<div class="upload_list_width upload_list_decor" id="#{clientId}">
-
- <table class="upload_toolbar_decor">
- <tr>
- <td>
- <div class="upload_button_border" style=" float:left;">
- <div class="upload_button upload_font" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'" onmouseout="this.className='upload_button upload_font'"
- style="position: relative; overflow: hidden; direction: rtl; width:70px">
- <div class="upload_button_content upload_font upload_ico upload_ico_add" style="">Add...</div>
- <input type="file" style="cursor: pointer; z-index: 3; width: 0px; height: 22px; left: 0px; top: 0px; position: absolute"
- class="hidden"
- id="#{clientId}:file"
- name="fileName"
- onchange="#{this:getAddFileClick(context,component)}; return false;"/>
- </div>
- </div>
- <div class="upload_button_border" style=" float:left;">
- <div class="upload_button upload_font" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
- onmouseout="this.className='upload_button upload_font'"
- onclick="javascript: if ((new FileUpload('#{clientId}').getFilesCount()) > 0) { #{this:getUploadAllClick(context, component)} }">
- <a href="#" class="upload_button_selection">
- <div class="upload_button_content upload_font upload_ico upload_ico_start"><b>Upload</b>
- </div>
- </a>
- </div>
- </div>
- <div class="upload_button_border" style=" float:right">
- <div class="upload_button upload_font" onmouseover="this.className='upload_button_light upload_font'" onmousedown="this.className='upload_button_press upload_font'" onmouseup="this.className='upload_button upload_font'"
- onmouseout="this.className='upload_button upload_font'"
- onclick="#{this:getClearAllClick(context, component)}">
- <a href="#" class="upload_button_selection">
- <div class="upload_button_content upload_font upload_ico upload_ico_clear">Clear All</div>
- </a>
- </div>
- </div>
- </td>
- </tr>
- </table>
-
- <div class="upload_list_width upload_list_overflow" id="#{clientId}:fileItems">
-
- <jsp:scriptlet>
- <![CDATA[
- Iterator<org.richfaces.org.jboss.seam.ui.component.FileItem> it = component.getFileItems().iterator();
- Integer i = 0;
- while (it.hasNext()) {
- org.richfaces.org.jboss.seam.ui.component.FileItem item = it.next();
- String fullFileName = item.getFullFileName();
- String fileName = item.getFileName();
- variables.setVariable("fileName",fileName);
- variables.setVariable("fullFileName",fullFileName);
- variables.setVariable("n",i);
- ]]>
- </jsp:scriptlet>
-
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td class="upload_font upload_name upload_table_td">
- <div class="upload_name_padding">
- #{fileName}
- </div>
-
- <jsp:scriptlet>
- <![CDATA[
- renderProgress(context, component, item);
- ]]>
- </jsp:scriptlet>
- <br/>
-
- <div class="upload_name_padding">
- <b>
- <jsp:scriptlet>
- <![CDATA[
- renderLabel(context, component, item);
- ]]>
- </jsp:scriptlet>
- </b>
- </div>
-
-
- </td>
- <td class="upload_table_td">
- <jsp:scriptlet>
- <![CDATA[
- if (isCanClear(item)) {
- ]]>
- </jsp:scriptlet>
- <div class="upload_font upload_del">
- <a href="#" class="upload_anc"
- onmousedown="return new FileUpload().confirm(this,'Clear','text-decoration:none; color:#EAF0F8','#{clientId}:clear#{n}');"
- onclick="#{this:getClearFileClick(context, component)}"
- style="text-decoration: none; color:#EAF0F8">Clear</a>
- </div>
- <jsp:scriptlet>
- <![CDATA[
- } else {
- ]]>
- </jsp:scriptlet>
- <div class="upload_font upload_del">
- <a href="#" class="upload_anc"
- onclick="new FileUpload('#{clientId}').stop(); #{this:getStopFileClick(context, component)}">Stop</a>
- </div>
-
- <jsp:scriptlet>
- <![CDATA[
- }
- ]]>
- </jsp:scriptlet>
- <div class="upload_font upload_del"><br /></div>
- </td>
- <td class="upload_table_td">
- <div class="upload_font upload_scroll"></div>
- </td>
- </tr>
- </table>
-
- <jsp:scriptlet>
- <![CDATA[
- i++;
- }
- ]]>
- </jsp:scriptlet>
-
- <span>
- <script type="text/javascript">
- <f:call name="encodeUploadScript" />
- </script>
- </span>
-
- </div>
-
- <span>
- <script type="text/javascript">
- <f:call name="encodeInitialScript" />
- </script>
- </span>
-</div>
-
-
-</f:root>
\ No newline at end of file
16 years, 3 months
JBoss Rich Faces SVN: r5823 - trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-05 10:36:33 -0500 (Tue, 05 Feb 2008)
New Revision: 5823
Modified:
trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
Log:
fix js error
Modified: trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js
===================================================================
--- trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2008-02-05 15:22:59 UTC (rev 5822)
+++ trunk/sandbox/ui/progressBAR/src/main/resources/org/richfaces/renderkit/html/js/progressBar.js 2008-02-05 15:36:33 UTC (rev 5823)
@@ -30,6 +30,7 @@
return null;
},
onComplete: function (data) {
+ if (!$(this.id)) { return; }
if (data) {
this.updateComponent(data);
this.renderLabel(data['markup'], data['context']);
16 years, 3 months
JBoss Rich Faces SVN: r5820 - trunk/docs/userguide/en/src/main/docbook/included.
by richfaces-svn-commits@lists.jboss.org
Author: artdaw
Date: 2008-02-05 10:03:00 -0500 (Tue, 05 Feb 2008)
New Revision: 5820
Modified:
trunk/docs/userguide/en/src/main/docbook/included/tree.xml
Log:
http://jira.jboss.com/jira/browse/RF-1137 - edited 'Events handling' section, added some new Classes names
Modified: trunk/docs/userguide/en/src/main/docbook/included/tree.xml
===================================================================
--- trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-02-05 13:55:41 UTC (rev 5819)
+++ trunk/docs/userguide/en/src/main/docbook/included/tree.xml 2008-02-05 15:03:00 UTC (rev 5820)
@@ -371,7 +371,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
<rich:treeNode type="artist" iconLeaf="/images/tree/singer.png" icon="/images/tree/singer.png">
@@ -451,7 +451,7 @@
<para>
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[<h: outputText value="#{varAttributeName}">]]></programlisting>
+ <programlisting role="XML"><![CDATA[<h: outputText value="#{varAttributeName}">]]></programlisting>
<para>
<property>"varAttributeName"</property> is a value for <emphasis>
<property>"var"</property>
@@ -490,7 +490,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:tree style="width:300px" value="#{library.data}" var="item" nodeFace="#{item.type}">
...
@@ -565,7 +565,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<rich:tree ....>
...
<f:facet name="icon">
@@ -670,7 +670,7 @@
<emphasis role="bold">Example:</emphasis>
</para>
- <programlisting role="JAVA"><![CDATA[...
+ <programlisting role="XML"><![CDATA[...
<h:form>
<rich:tree dragIndicator=":treeDragIndicator" dropListener="#{libraryAjaxTree.processDrop}" style="width:300px" value="#{libraryAjaxTree.data}" var="item" nodeFace="#{item.type}">
<rich:treeNode type="artist" acceptedTypes="album" iconLeaf="/images/tree/group.png" icon="/images/tree/group.png">
@@ -714,24 +714,22 @@
<title>Events handling</title>
<para>Listeners classes that process events on the server side are defined with the help of:</para>
<itemizedlist>
- <listitem>nodeSelectListener is called during request sending on a node selecting event (if
- request sending on this event is defined)</listitem>
+ <listitem>changeExpandListener processes expand/collapse event of a <property>treeNode</property></listitem>
<listitem>dropListener processes a Drop event</listitem>
- <listitem>dragListener processes a Drug event</listitem>
- <listitem>changeExpandListener processes expand/collapse event of a
- <property>treeNode</property></listitem>
+ <listitem>dragListener processes a Drag event</listitem>
+ <listitem>nodeSelectListener is called during request sending on a node selecting event (if request sending on this event is defined)</listitem>
</itemizedlist>
<para>Listener methods can be defined using the <link linkend="treeNodeKF">following
attributes</link> or using nested tags.</para>
<para>Client event attributes are:</para>
<itemizedlist>
- <listitem>onexpand - expands a node event</listitem>
- <listitem>oncollapse - collapses a node event</listitem>
- <listitem>ondragexit - element passing out from a tree zone event</listitem>
- <listitem>ondragstart - drags a start event</listitem>
- <listitem>ondragend - drags an end event (a drop event)</listitem>
- <listitem>ondragenter - drags an element appearing on a tree event</listitem>
+ <listitem>onexpand is a script expression to invoke when a node is expanded</listitem>
+ <listitem>oncollapse is a script expression to invoke when a node is collapsed</listitem>
+ <listitem>ondragexit is a script expression to invoke when an element passing out from a tree zone</listitem>
+ <listitem>ondragstart is a script expression to invoke when drag starts</listitem>
+ <listitem>ondragend is a script expression to invoke when drag ends (a drop event)</listitem>
+ <listitem>ondragenter is a script expression to invoke when an dragged element appears on a tree</listitem>
</itemizedlist>
<para>They can be used to add some JavaScript effects.</para>
@@ -819,6 +817,22 @@
<entry>rich-tree</entry>
<entry>Defines styles for a wrapper <div> element of a tree</entry>
</row>
+ <row>
+ <entry>rich-tree-node</entry>
+ <entry>Defines styles for a node of a tree</entry>
+ </row>
+ <row>
+ <entry>rich-tree-node-children</entry>
+ <entry>Defines styles for a wrapper <div> element of a child node of a tree</entry>
+ </row>
+ <row>
+ <entry>rich-tree-node-selected</entry>
+ <entry>Defines styles for a selected node of a tree</entry>
+ </row>
+ <row>
+ <entry>rich-tree-node-highlighted</entry>
+ <entry>Defines styles for a highlighted node of a tree</entry>
+ </row>
</tbody>
</tgroup>
</table>
16 years, 3 months
JBoss Rich Faces SVN: r5819 - trunk.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-02-05 08:55:41 -0500 (Tue, 05 Feb 2008)
New Revision: 5819
Modified:
trunk/pom.xml
Log:
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2008-02-05 13:46:39 UTC (rev 5818)
+++ trunk/pom.xml 2008-02-05 13:55:41 UTC (rev 5819)
@@ -55,10 +55,10 @@
<module>cdk</module>
<module>framework</module>
<module>ui</module>
- <module>extensions</module>
- <module>docs</module>
+ <!--module>extensions</module-->
+ <!--module>docs</module-->
<module>ui/assembly</module>
- <module>samples</module>
+ <!--module>samples</module-->
<!--
<module>sandbox</module>
-->
16 years, 3 months
JBoss Rich Faces SVN: r5818 - in trunk/ui/listShuttle/src/main: resources/org/richfaces/renderkit/html/scripts and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-05 08:46:39 -0500 (Tue, 05 Feb 2008)
New Revision: 5818
Modified:
trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
Log:
changes for pickList
Modified: trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java
===================================================================
--- trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2008-02-05 13:04:33 UTC (rev 5817)
+++ trunk/ui/listShuttle/src/main/java/org/richfaces/renderkit/ListShuttleRendererBase.java 2008-02-05 13:46:39 UTC (rev 5818)
@@ -289,7 +289,7 @@
UIListShuttle listShuttle = (UIListShuttle) component;
String clientId = listShuttle.getBaseClientId(context);
- ExternalContext externalContext = context.getExternalContext();
+ ExternalContext externalContext = context.getExternalContext();
Map requestParameterMap = externalContext
.getRequestParameterMap();
Modified: trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js
===================================================================
--- trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-02-05 13:04:33 UTC (rev 5817)
+++ trunk/ui/listShuttle/src/main/resources/org/richfaces/renderkit/html/scripts/ListShuttle.js 2008-02-05 13:46:39 UTC (rev 5818)
@@ -174,9 +174,9 @@
if (!LayoutManager.isIE() && (targetComponent.shuttleTbody.rows.length == 0)) {
var newItem = null;
if (item instanceof Richfaces.ListShuttle.Target.SelectItem) {
- newItem = new Richfaces.ListShuttle.Target.SelectItem(item._label, item._id, item._node.cloneNode(true));
+ newItem = new this.targetList.controlClass(item._label, item._id, item._node.cloneNode(true));
} else {
- newItem = new Richfaces.ListShuttle.Source.SelectItem(item._label, item._id, item._node.cloneNode(true));
+ newItem = new this.sourceList.controlClass(item._label, item._id, item._node.cloneNode(true));
}
this.tableUpdate(targetComponent);
this.addItem(targetComponent, newItem);
16 years, 3 months
JBoss Rich Faces SVN: r5817 - management/design/fileUpload.
by richfaces-svn-commits@lists.jboss.org
Author: ilya_shaikovsky
Date: 2008-02-05 08:04:33 -0500 (Tue, 05 Feb 2008)
New Revision: 5817
Modified:
management/design/fileUpload/Func Spec - File Upload Component.doc
Log:
Modified: management/design/fileUpload/Func Spec - File Upload Component.doc
===================================================================
(Binary files differ)
16 years, 3 months