JBoss Rich Faces SVN: r8141 - trunk/test-applications/jsp/src/main/webapp/PickList.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-24 14:54:53 -0400 (Thu, 24 Apr 2008)
New Revision: 8141
Modified:
trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
Log:
fix attribute
Modified: trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-04-24 18:49:58 UTC (rev 8140)
+++ trunk/test-applications/jsp/src/main/webapp/PickList/PickList.jsp 2008-04-24 18:54:53 UTC (rev 8141)
@@ -10,7 +10,7 @@
style="#{style.style}" styleClass="#{style.styleClass}"
copyAllControlLabel="#{pickList.copyAllControlLabel}"
copyControlLabel="#{pickList.copyControlLabel}"
- disabled="#{pickList.copyControlLabel}" dir="#{pickList.dir}"
+ disabled="#{pickList.copyControlLabel}"
immediate="#{pickList.immediate}"
listsHeight="#{pickList.listsHeight}"
moveControlsVerticalAlign="#{pickList.moveControlsVerticalAlign}"
@@ -19,7 +19,7 @@
rendered="#{pickList.rendered}"
sourceListWidth="#{pickList.sourceListWidth}"
title="#{pickList.title}" switchByClick="#{pickList.switchByClick}"
- targetListWidth="#{pickList.targetListWidth}" size="#{pickList.size}"
+ targetListWidth="#{pickList.targetListWidth}"
required="#{pickList.required}"
requiredMessage="#{pickList.requiredMessage}"
onclick="#{event.onclick}" onblur="#{event.onblur}"
@@ -30,7 +30,7 @@
onmouseout="#{event.onmouseout}" onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
binding="#{pickList.myPickList}"
- lang="#{pickList.lang}">
+ >
<f:selectItems value="#{pickList.data}"/>
</rich:pickList>
<h:panelGrid columns="2">
16 years, 8 months
JBoss Rich Faces SVN: r8140 - trunk/test-applications/jsp/src/main/webapp/pages/RichMenu.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-24 14:49:58 -0400 (Thu, 24 Apr 2008)
New Revision: 8140
Modified:
trunk/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp
Log:
add immediate="true"
Modified: trunk/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp 2008-04-24 18:49:54 UTC (rev 8139)
+++ trunk/test-applications/jsp/src/main/webapp/pages/RichMenu/RichMenu.jsp 2008-04-24 18:49:58 UTC (rev 8140)
@@ -4,8 +4,12 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="richMenuSubviewID">
- <h:panelGrid columns="5" border="1">
+ <h:panelGrid columns="6" border="1">
<h:panelGrid columns="2">
+ <h:outputText value="a4j:log"></h:outputText>
+ <h:selectBooleanCheckbox value="#{option.consol}" onchange="submit();"></h:selectBooleanCheckbox>
+ </h:panelGrid>
+ <h:panelGrid columns="2">
<h:outputText value="h" />
<h:outputText value="a4j" />
<h:commandButton value="submit" style="width : 85px; height : 21px;"></h:commandButton>
@@ -46,7 +50,7 @@
<h:panelGrid columns="1">
<h:outputText value="Select component:" />
- <h:selectOneMenu value="#{richBean.src}" onchange="submit();">
+ <h:selectOneMenu value="#{richBean.src}" immediate="true" onchange="submit();">
<f:selectItems value="#{richBean.list}" />
<f:param value="#{richBean.src}" name="currentComponent"/>
</h:selectOneMenu>
16 years, 8 months
JBoss Rich Faces SVN: r8139 - trunk/test-applications/facelets/src/main/webapp/pages/RichMenu.
by richfaces-svn-commits@lists.jboss.org
Author: ayanul
Date: 2008-04-24 14:49:54 -0400 (Thu, 24 Apr 2008)
New Revision: 8139
Modified:
trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml
Log:
add immediate="true"
Modified: trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml
===================================================================
--- trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml 2008-04-24 16:35:08 UTC (rev 8138)
+++ trunk/test-applications/facelets/src/main/webapp/pages/RichMenu/RichMenu.xhtml 2008-04-24 18:49:54 UTC (rev 8139)
@@ -41,7 +41,7 @@
<h:panelGrid columns="1">
<h:outputText value="Select component:" />
- <h:selectOneMenu value="#{richBean.src}" onchange="submit();">
+ <h:selectOneMenu value="#{richBean.src}" immediate="true" onchange="submit();">
<f:selectItems value="#{richBean.list}" />
<f:param value="#{richBean.src}" name="currentComponent"/>
</h:selectOneMenu>
16 years, 8 months
JBoss Rich Faces SVN: r8138 - in trunk/ui/columns/src/main: java/org/richfaces/taglib and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-04-24 12:35:08 -0400 (Thu, 24 Apr 2008)
New Revision: 8138
Modified:
trunk/ui/columns/src/main/config/component/columns.xml
trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
Log:
RF-3209
Modified: trunk/ui/columns/src/main/config/component/columns.xml
===================================================================
--- trunk/ui/columns/src/main/config/component/columns.xml 2008-04-24 16:08:27 UTC (rev 8137)
+++ trunk/ui/columns/src/main/config/component/columns.xml 2008-04-24 16:35:08 UTC (rev 8138)
@@ -75,5 +75,12 @@
<name>first</name>
<classname>java.lang.Object</classname>
</property>
+ <property hidden="true" exist="false">
+ <name>binding</name>
+ <classname>java.lang.Object</classname>
+ <description>
+ Binding attribute
+ </description>
+ </property>
</component>
</components>
Modified: trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java
===================================================================
--- trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2008-04-24 16:08:27 UTC (rev 8137)
+++ trunk/ui/columns/src/main/java/org/richfaces/taglib/ColumnsTag.java 2008-04-24 16:35:08 UTC (rev 8138)
@@ -149,17 +149,9 @@
* </p>
*/
private static final String COMPONENT_TAG_STACK_ATTR = "javax.faces.webapp.COMPONENT_TAG_STACK";
-
+
/**
* <p>
- * The value binding expression (if any) used to wire up this component to a
- * {@link UIComponent} property of a JavaBean class.
- * </p>
- */
- private ValueExpression binding = null;
-
- /**
- * <p>
* An override for the rendered attribute associated with our
* {@link UIComponent}.
* </p>
@@ -595,21 +587,6 @@
this.rendered = rendered;
}
- /**
- * <p>
- * Set the value expression for our component.
- * </p>
- *
- * @param binding
- * The new value expression
- *
- * @throws JspException
- * if an error occurs
- */
- public void setBinding(ValueExpression binding) throws JspException {
- this.binding = binding;
- }
-
/*
* (non-Javadoc)
*
16 years, 8 months
JBoss Rich Faces SVN: r8137 - trunk/samples/fileUploadDemo/src/main/java/org/richfaces.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-04-24 12:08:27 -0400 (Thu, 24 Apr 2008)
New Revision: 8137
Modified:
trunk/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
Log:
Modified: trunk/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
===================================================================
--- trunk/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-04-24 16:06:00 UTC (rev 8136)
+++ trunk/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-04-24 16:08:27 UTC (rev 8137)
@@ -25,7 +25,9 @@
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
+import java.rmi.server.UID;
import java.util.ArrayList;
+import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -65,16 +67,22 @@
this.flag = flag;
}
- public void listener(UploadEvent event) throws Exception{
+ public void listener(UploadEvent event){
UploadItem item = event.getUploadItem();
System.out.println("File : '" + item.getFileName() + "' was uploaded");
- if (item.isFile()) {
+ if (item.isTempFile()) {
File file = item.getFile();
System.out.println("Absolute Path : '" + file.getAbsolutePath() + "'!");
+ file.delete();
}else {
- ByteArrayOutputStream b = new ByteArrayOutputStream();
- b.write(item.getData());
- System.out.println(b.toString());
+ try {
+ ByteArrayOutputStream b = new ByteArrayOutputStream();
+ b.write(item.getData());
+ System.out.println(b.toString());
+ } catch (Exception e) {
+ // TODO: handle exception
+ }
+
}
}
16 years, 8 months
JBoss Rich Faces SVN: r8136 - trunk/samples/suggestionbox-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-04-24 12:06:00 -0400 (Thu, 24 Apr 2008)
New Revision: 8136
Modified:
trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
Log:
Update test for http://jira.jboss.com/jira/browse/RF-2610
Modified: trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-24 16:05:46 UTC (rev 8135)
+++ trunk/samples/suggestionbox-sample/src/main/webapp/pages/index.jsp 2008-04-24 16:06:00 UTC (rev 8136)
@@ -157,6 +157,10 @@
<f:verbatim> </f:verbatim>
<h:inputText value="#{suggestionBox.cellpadding}" onchange="submit()" />
+ <f:verbatim>First Value</f:verbatim>
+ <f:verbatim> </f:verbatim>
+ <h:inputText value="#{suggestionBox.first}" onchange="submit()"/>
+
<f:verbatim>Onsubmit function will return</f:verbatim>
<f:verbatim> </f:verbatim>
<h:selectOneRadio value="#{suggestionBox.onsubmit}" onchange="submit()">
16 years, 8 months
JBoss Rich Faces SVN: r8135 - in trunk/ui: modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: pyaschenko
Date: 2008-04-24 12:05:46 -0400 (Thu, 24 Apr 2008)
New Revision: 8135
Modified:
trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js
trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
Log:
http://jira.jboss.com/jira/browse/RF-2022
Modified: trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js
===================================================================
--- trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-04-24 15:42:17 UTC (rev 8134)
+++ trunk/ui/calendar/src/main/resources/org/richfaces/renderkit/html/scripts/calendar.js 2008-04-24 16:05:46 UTC (rev 8135)
@@ -762,6 +762,7 @@
obj=obj.nextSibling;
obj.component = this;
obj.richfacesComponent="richfaces:calendar";
+ this["rich:destructor"] = "destructor";
// memory leaks fix
obj = null;
@@ -784,6 +785,14 @@
},
+ destructor: function()
+ {
+ if (this.params.popup && this.isVisible)
+ {
+ Event.stopObserving(window.document, "click", this.eventOnCollapse, false);
+ }
+ },
+
dateEditorSelectYear: function(value)
{
if (this.dateEditorYearID)
Modified: trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js
===================================================================
--- trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-04-24 15:42:17 UTC (rev 8134)
+++ trunk/ui/modal-panel/src/main/resources/org/richfaces/renderkit/html/scripts/modalPanelBorders.js 2008-04-24 16:05:46 UTC (rev 8135)
@@ -18,6 +18,12 @@
destroy: function()
{
+ if (this.doingDrag)
+ {
+ Event.stopObserving(document, 'mousemove', this.boundDoDrag);
+ Event.stopObserving(document, 'mouseup', this.boundEndDrag);
+ }
+
Event.stopObserving(this.id, 'mousedown', this.boundStartDrag);
this.modalPanel=null;
},
Modified: trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js
===================================================================
--- trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-04-24 15:42:17 UTC (rev 8134)
+++ trunk/ui/tooltip/src/main/resources/org/richfaces/renderkit/html/scripts/tooltip.js 2008-04-24 16:05:46 UTC (rev 8135)
@@ -107,6 +107,10 @@
destroy: function()
{
+ if (!this.parentAttached && !this.disabled) {
+ Event.stopObserving(document, "mousemove", this.attachOnLoadEventsListner, true);
+ }
+
if (this.toolTip) {
this.toolTip.component = null;
}
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js 2008-04-24 15:42:17 UTC (rev 8134)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree-selection.js 2008-04-24 16:05:46 UTC (rev 8135)
@@ -12,6 +12,11 @@
this.eventPreventLostFocus = this.processPreventLostFocus.bindAsEventListener(this);
Event.observe(this.tree.element, "click", this.eventPreventLostFocus);
},
+
+ destroy: function() {
+ Event.stopObserving(document, "keydown", this.eventKeyPress);
+ Event.stopObserving(document, "click", this.eventLostFocus);
+ },
restoreSelection: function() {
if (this.tree.input.value)
Modified: trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js
===================================================================
--- trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2008-04-24 15:42:17 UTC (rev 8134)
+++ trunk/ui/tree/src/main/resources/org/richfaces/renderkit/html/scripts/tree.js 2008-04-24 16:05:46 UTC (rev 8135)
@@ -31,6 +31,7 @@
this.oncollapse = new Function('event', (events.oncollapse ? events.oncollapse : "") + "; return true;");
this.onAjaxSelect = onAjaxSelect;
this.element = $(id);
+ this.element.component=this;
this.inputId = input;
this.input = $(this.inputId);
this.toggleOnClick = toggleOnClick;
@@ -48,6 +49,8 @@
this.selectionManager = new Tree.SelectionManager(this);
this.selectionManager.restoreSelection();
+
+ this["rich:destructor"] = "destroy";
Event.observe(this.element, "click", function(event) {
if (Richfaces.eventIsSynthetic(event)) {
@@ -108,6 +111,11 @@
}
}.bindAsEventListener(this));
},
+
+ destroy: function() {
+ this.selectionManager.destroy();
+ this.element.component=null;
+ },
getElements: function(ajaxUpdate) {
this.elements.contentTd = $(this.id +
16 years, 8 months
JBoss Rich Faces SVN: r8134 - trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-04-24 11:42:17 -0400 (Thu, 24 Apr 2008)
New Revision: 8134
Modified:
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
RF-3234
Modified: trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
===================================================================
--- trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-04-24 15:35:17 UTC (rev 8133)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-04-24 15:42:17 UTC (rev 8134)
@@ -586,6 +586,7 @@
elt.onchange = null;
elt.style.cssText = "position: absolute; right: 0px; top: 0px; display: none; visibility: hidden;";
newUpload.id = this.id + ":file" + (this.idCounter++);
+ newUpload.value = '';
this.currentInput = newUpload;
elt.parentNode.appendChild(newUpload);
16 years, 8 months
JBoss Rich Faces SVN: r8133 - trunk/ui/fileUpload/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-04-24 11:35:17 -0400 (Thu, 24 Apr 2008)
New Revision: 8133
Modified:
trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
Log:
Modified: trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-04-24 15:32:18 UTC (rev 8132)
+++ trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-04-24 15:35:17 UTC (rev 8133)
@@ -389,6 +389,10 @@
<name>valid</name>
<classname>boolean</classname>
</property>
+ <property hidden="true" existintag="false" exist="false" >
+ <name>accessKey</name>
+ <classname>java.lang.Object</classname>
+ </property>
</component>
&listeners;
</components>
16 years, 8 months
JBoss Rich Faces SVN: r8132 - in trunk/test-applications/jsp/src/main: java/fileUpload and 6 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-04-24 11:32:18 -0400 (Thu, 24 Apr 2008)
New Revision: 8132
Added:
trunk/test-applications/jsp/src/main/java/org/
trunk/test-applications/jsp/src/main/java/org/richfaces/
trunk/test-applications/jsp/src/main/java/org/richfaces/renderkit/
trunk/test-applications/jsp/src/main/java/org/richfaces/renderkit/fileUpload.properties
Modified:
trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java
trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp
trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Converter.xml
trunk/test-applications/jsp/src/main/webapp/styles/styles.css
Log:
uploadData="#{fileUpload.data}"
acceptedTypes="#{fileUpload.acceptedTypes}"
disabled="#{fileUpload.disabled}"
autoclear="#{fileUpload.autoclear}"
required="#{fileUpload.required}"
requiredMessage="#{fileUpload.requiredMessage}"
rendered="#{fileUpload.rendered}"
listHeight="#{fileUpload.listHeight}"
listWidth="#{fileUpload.listWidth}"
maxFilesQuantity="#{fileUpload.maxFilesQuantity}"
fileUploadListener="#{fileUpload.fileUploadListener}"
onuploadcanceled="#{event.onuploadcanceled}"
onclear="#{event.onclear}"
onblur="#{event.onblur}"
onchange="#{event.onchange}"
onclick="#{event.onclick}"
ondblclick="#{event.ondblclick}"
onerror="#{event.onerror}"
onfocus="#{event.onfocus}"
onkeydown="#{event.onkeydown}"
onkeypress="#{event.onkeypress}"
onkeyup="#{event.onkeyup}"
onmousedown="#{event.onmousedown}"
onmousemove="#{event.onmousemove}"
onmouseout="#{event.onmousemout}"
onmouseover="#{event.onmouseover}"
onmouseup="#{event.onmouseup}"
onselect="#{event.onselect}"
onsizerejected="#{event.onsizerejected}"
ontyperejected="#{event.ontyperejected}"
onupload="#{event.onupload}"
onuploadcomplete="#{event.onuploadcomplete}"
accesskey="y" alt="alternative"
align="#{fileUpload.align}"
binding="#{fileUpload.myFileUpload}"
addButtonClass="#{fileUpload.addButtonClass}"
addButtonClassDisabled="#{fileUpload.addButtonClassDisabled}"
cancelButtonClass="#{fileUpload.cancelButtonClass}"
cancelButtonClassDisabled="#{fileUpload.cancelButtonClassDisabled}"
cleanButtonClass="#{fileUpload.cleanButtonClass}"
cleanButtonClassDisabled="#{fileUpload.cleanButtonClassDisabled}"
fileEntryClass="#{fileUpload.fileEntryClass}"
fileEntryControlClass="#{fileUpload.fileEntryControlClass}"
fileEntryControlClassDisabled="#{fileUpload.fileEntryControlClassDisabled}"
fileEntryClassDisabled="#{fileUpload.fileEntryControlClassDisabled}"
uploadButtonClass="#{fileUpload.uploadButtonClass}"
uploadButtonClassDisabled="#{fileUpload.uploadButtonClassDisabled}"
uploadListClass="#{fileUpload.uploadListClass}"
uploadListClassDisabled="#{fileUpload.uploadListClassDisabled}"
converter="fileUploadConverter"
immediateUpload="#{fileUpload.immediateUpload}"
locale="ru"
noDuplicate="#{fileUpload.noDuplicate}"
tabindex="222"
valueChangeListener="#{fileUpload.valueChangeListener}"
Modified: trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java
===================================================================
--- trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java 2008-04-24 15:02:45 UTC (rev 8131)
+++ trunk/test-applications/jsp/src/main/java/fileUpload/FileUpload.java 2008-04-24 15:32:18 UTC (rev 8132)
@@ -2,37 +2,99 @@
import java.io.ByteArrayOutputStream;
import java.io.File;
-import java.io.IOException;
+//import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
-import java.io.InputStream;
+//import java.io.InputStream;
+import org.richfaces.component.html.HtmlFileUpload;
+import javax.faces.context.FacesContext;
+import javax.faces.event.ActionEvent;
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
+import javax.faces.event.ValueChangeEvent;
public class FileUpload {
private boolean disabled;
private boolean autoclear;
private boolean rendered;
private boolean required;
+ private boolean immediateUpload;
private String acceptedTypes;
private String requiredMessage;
private String listHeight;
private String listWidth;
+ private String align;
+ private String bindLabel;
+
+ private String addButtonClass;
+ private String addButtonClassDisabled;
+ private String cancelButtonClass;
+ private String cancelButtonClassDisabled;
+ private String cleanButtonClass;
+ private String cleanButtonClassDisabled;
+ private String fileEntryClass;
+ private String fileEntryControlClass;
+ private String fileEntryControlClassDisabled;
+ private String fileEntryClassDisabled;
+ private String uploadButtonClass;
+ private String uploadButtonClassDisabled;
+ private String uploadListClass;
+ private String uploadListClassDisabled;
+ private String changedLabel;
+
+
private List data;
private Integer maxFilesQuantity;
-
+ private HtmlFileUpload myFileUpload;
+ private boolean noDuplicate;
+
+ public String getBindLabel() {
+ return bindLabel;
+ }
+
+ public void setBindLabel(String bindLabel) {
+ this.bindLabel = bindLabel;
+ }
+
+ public HtmlFileUpload getMyFileUpload() {
+ return myFileUpload;
+ }
+
+ public void setMyFileUpload(HtmlFileUpload myFileUpload) {
+ this.myFileUpload = myFileUpload;
+ }
+
public FileUpload() {
data = new ArrayList();
disabled = false;
autoclear = false;
rendered = true;
required = false;
+ immediateUpload = false;
acceptedTypes = "*";
requiredMessage = "requiredMessage";
listHeight = "200px";
listWidth = "150px";
maxFilesQuantity = 3;
+ align = "left";
+ bindLabel = "not ready";
+ changedLabel = "not ready";
+ addButtonClass="test";
+ addButtonClassDisabled="test";
+ cancelButtonClass="test";
+ cancelButtonClassDisabled="test";
+ cleanButtonClass="test";
+ cleanButtonClassDisabled="test";
+ fileEntryClass="test";
+ fileEntryControlClass="test";
+ fileEntryControlClassDisabled="test";
+ fileEntryClassDisabled="test";
+ uploadButtonClass="test";
+ uploadButtonClassDisabled="test";
+ uploadListClass="test";
+ uploadListClassDisabled="test";
+ noDuplicate = false;
}
public void fileUploadListener(UploadEvent event) throws Exception{
@@ -47,6 +109,11 @@
System.out.println("FileUpload.fileUploadListener()");
}
+ public void checkBinding(ActionEvent actionEvent){
+ FacesContext context = FacesContext.getCurrentInstance();
+ bindLabel = myFileUpload.getClientId(context);
+ }
+
public boolean isDisabled() {
return disabled;
}
@@ -128,4 +195,152 @@
public void setData(List data) {
this.data = data;
}
+
+ public String getAlign() {
+ return align;
+ }
+
+ public void setAlign(String align) {
+ this.align = align;
+ }
+
+ public String getAddButtonClass() {
+ return addButtonClass;
+ }
+
+ public void setAddButtonClass(String addButtonClass) {
+ this.addButtonClass = addButtonClass;
+ }
+
+ public String getAddButtonClassDisabled() {
+ return addButtonClassDisabled;
+ }
+
+ public void setAddButtonClassDisabled(String addButtonClassDisabled) {
+ this.addButtonClassDisabled = addButtonClassDisabled;
+ }
+
+ public String getCancelButtonClass() {
+ return cancelButtonClass;
+ }
+
+ public void setCancelButtonClass(String cancelButtonClass) {
+ this.cancelButtonClass = cancelButtonClass;
+ }
+
+ public String getCancelButtonClassDisabled() {
+ return cancelButtonClassDisabled;
+ }
+
+ public void setCancelButtonClassDisabled(String cancelButtonClassDisabled) {
+ this.cancelButtonClassDisabled = cancelButtonClassDisabled;
+ }
+
+ public String getCleanButtonClass() {
+ return cleanButtonClass;
+ }
+
+ public void setCleanButtonClass(String cleanButtonClass) {
+ this.cleanButtonClass = cleanButtonClass;
+ }
+
+ public String getCleanButtonClassDisabled() {
+ return cleanButtonClassDisabled;
+ }
+
+ public void setCleanButtonClassDisabled(String cleanButtonClassDisabled) {
+ this.cleanButtonClassDisabled = cleanButtonClassDisabled;
+ }
+
+ public String getFileEntryClass() {
+ return fileEntryClass;
+ }
+
+ public void setFileEntryClass(String fileEntryClass) {
+ this.fileEntryClass = fileEntryClass;
+ }
+
+ public String getFileEntryControlClass() {
+ return fileEntryControlClass;
+ }
+
+ public void setFileEntryControlClass(String fileEntryControlClass) {
+ this.fileEntryControlClass = fileEntryControlClass;
+ }
+
+ public String getFileEntryControlClassDisabled() {
+ return fileEntryControlClassDisabled;
+ }
+
+ public void setFileEntryControlClassDisabled(
+ String fileEntryControlClassDisabled) {
+ this.fileEntryControlClassDisabled = fileEntryControlClassDisabled;
+ }
+
+ public String getFileEntryClassDisabled() {
+ return fileEntryClassDisabled;
+ }
+
+ public void setFileEntryClassDisabled(String fileEntryClassDisabled) {
+ this.fileEntryClassDisabled = fileEntryClassDisabled;
+ }
+
+ public String getUploadButtonClass() {
+ return uploadButtonClass;
+ }
+
+ public void setUploadButtonClass(String uploadButtonClass) {
+ this.uploadButtonClass = uploadButtonClass;
+ }
+
+ public String getUploadButtonClassDisabled() {
+ return uploadButtonClassDisabled;
+ }
+
+ public void setUploadButtonClassDisabled(String uploadButtonClassDisabled) {
+ this.uploadButtonClassDisabled = uploadButtonClassDisabled;
+ }
+
+ public String getUploadListClass() {
+ return uploadListClass;
+ }
+
+ public void setUploadListClass(String uploadListClass) {
+ this.uploadListClass = uploadListClass;
+ }
+
+ public String getUploadListClassDisabled() {
+ return uploadListClassDisabled;
+ }
+
+ public void setUploadListClassDisabled(String uploadListClassDisabled) {
+ this.uploadListClassDisabled = uploadListClassDisabled;
+ }
+
+ public boolean isImmediateUpload() {
+ return immediateUpload;
+ }
+
+ public void setImmediateUpload(boolean immediateUpload) {
+ this.immediateUpload = immediateUpload;
+ }
+
+ public boolean isNoDuplicate() {
+ return noDuplicate;
+ }
+
+ public void setNoDuplicate(boolean noDuplicate) {
+ this.noDuplicate = noDuplicate;
+ }
+ public void valueChangeListener(ValueChangeEvent valueChangeEvent){
+ changedLabel = myFileUpload.getUploadData().toString();
+ }
+
+ public String getChangedLabel() {
+ return changedLabel;
+ }
+
+ public void setChangedLabel(String changedLabel) {
+ this.changedLabel = changedLabel;
+ }
}
Added: trunk/test-applications/jsp/src/main/java/org/richfaces/renderkit/fileUpload.properties
===================================================================
--- trunk/test-applications/jsp/src/main/java/org/richfaces/renderkit/fileUpload.properties (rev 0)
+++ trunk/test-applications/jsp/src/main/java/org/richfaces/renderkit/fileUpload.properties 2008-04-24 15:32:18 UTC (rev 8132)
@@ -0,0 +1,9 @@
+RICH_FILE_UPLOAD_CANCEL_LABEL=\u043D\u0435 \u043D\u0430\u0434\u0430
+RICH_FILE_UPLOAD_STOP_LABEL=\u0441\u0442\u0430\u044F\u0442\u044C\!
+RICH_FILE_UPLOAD_PROGRESS_LABEL=\u0434\u0443\u043C\u0430\u044E...
+RICH_FILE_UPLOAD_UPLOAD_LABEL=\u043F\u043E\u0435\u0445\u0430\u043B\u0438\!
+RICH_FILE_UPLOAD_CLEAR_LABEL=\u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0447\u0438\u0441\u0442\u0435\u043D\u044C\u043A\u043E\:)
+RICH_FILE_UPLOAD_CLEAR_ALL_LABEL=\u0441\u043D\u0435\u0441\u0442\u0438 \u0432\u0441\u0435 \:\\
+RICH_FILE_UPLOAD_ENTRY_CLEAR_LABEL=\u0441\u0442\u0435\u0440\u0435\u0442\u044C \u0438 \u043D\u0438\u0438\u0431\u0430\u0446\u043E
+RICH_FILE_UPLOAD_ENTRY_CANCEL_LABEL=\u044F \u043F\u0435\u0440\u0435\u0434\u0443\u043C\u0430\u043B
+RICH_FILE_UPLOAD_ADD_LABEL=\u0434\u0430\u0431\u0430\u0432\u0438\u0442\u044C \u0438\u0441\u0447\u043E
Modified: trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp 2008-04-24 15:02:45 UTC (rev 8131)
+++ trunk/test-applications/jsp/src/main/webapp/FileUpload/FileUpload.jsp 2008-04-24 15:32:18 UTC (rev 8132)
@@ -4,17 +4,18 @@
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<f:subview id="FileUploadSubviewID">
- <rich:fileUpload id="fileUploadID" uploadData="#{fileUpload.data}"
+ <rich:fileUpload id="fileUploadID"
+ uploadData="#{fileUpload.data}"
acceptedTypes="#{fileUpload.acceptedTypes}"
- disabled="#{fileUpload.disabled}" autoclear="#{fileUpload.autoclear}"
+ disabled="#{fileUpload.disabled}"
+ autoclear="#{fileUpload.autoclear}"
required="#{fileUpload.required}"
requiredMessage="#{fileUpload.requiredMessage}"
rendered="#{fileUpload.rendered}"
listHeight="#{fileUpload.listHeight}"
listWidth="#{fileUpload.listWidth}"
maxFilesQuantity="#{fileUpload.maxFilesQuantity}"
- fileUploadListener="#{fileUpload.fileUploadListener}"
- cleanButtonClass="test"
+ fileUploadListener="#{fileUpload.fileUploadListener}"
onuploadcanceled="#{event.onuploadcanceled}"
onclear="#{event.onclear}"
onblur="#{event.onblur}"
@@ -36,8 +37,29 @@
ontyperejected="#{event.ontyperejected}"
onupload="#{event.onupload}"
onuploadcomplete="#{event.onuploadcomplete}"
- accesskey="y"
- >
+ accesskey="y" alt="alternative"
+ align="#{fileUpload.align}"
+ binding="#{fileUpload.myFileUpload}"
+ addButtonClass="#{fileUpload.addButtonClass}"
+ addButtonClassDisabled="#{fileUpload.addButtonClassDisabled}"
+ cancelButtonClass="#{fileUpload.cancelButtonClass}"
+ cancelButtonClassDisabled="#{fileUpload.cancelButtonClassDisabled}"
+ cleanButtonClass="#{fileUpload.cleanButtonClass}"
+ cleanButtonClassDisabled="#{fileUpload.cleanButtonClassDisabled}"
+ fileEntryClass="#{fileUpload.fileEntryClass}"
+ fileEntryControlClass="#{fileUpload.fileEntryControlClass}"
+ fileEntryControlClassDisabled="#{fileUpload.fileEntryControlClassDisabled}"
+ fileEntryClassDisabled="#{fileUpload.fileEntryControlClassDisabled}"
+ uploadButtonClass="#{fileUpload.uploadButtonClass}"
+ uploadButtonClassDisabled="#{fileUpload.uploadButtonClassDisabled}"
+ uploadListClass="#{fileUpload.uploadListClass}"
+ uploadListClassDisabled="#{fileUpload.uploadListClassDisabled}"
+ converter="fileUploadConverter"
+ immediateUpload="#{fileUpload.immediateUpload}"
+ locale="ru"
+ noDuplicate="#{fileUpload.noDuplicate}"
+ tabindex="222"
+ valueChangeListener="#{fileUpload.valueChangeListener}">
<f:facet name="label">
<h:outputText value="{_KB}KB from {KB}KB uploaded :[ {mm}:{ss} ]"></h:outputText>
</f:facet>
@@ -80,8 +102,32 @@
<h:selectBooleanCheckbox value="#{fileUpload.required}"
onchange="submit();"></h:selectBooleanCheckbox>
+ <h:outputText value="immediateUpload"></h:outputText>
+ <h:selectBooleanCheckbox value="#{fileUpload.immediateUpload}">
+ <a4j:support event="onchange" reRender="fileUploadID"></a4j:support>
+ </h:selectBooleanCheckbox>
+
<h:outputText value="requiredMessage"></h:outputText>
<h:inputText value="#{fileUpload.requiredMessage}"
onchange="submit();"></h:inputText>
+
+ <h:outputText value="Align"></h:outputText>
+ <h:selectOneRadio value="#{fileUpload.align}">
+ <a4j:support event="onchange" reRender="fileUploadID"></a4j:support>
+ <f:selectItem itemLabel="right" itemValue="right"/>
+ <f:selectItem itemLabel="left" itemValue="left"/>
+ <f:selectItem itemLabel="center" itemValue="center"/>
+ </h:selectOneRadio>
+
+ <h:commandButton actionListener="#{fileUpload.checkBinding}" value="Binding"></h:commandButton>
+ <h:outputText value="#{fileUpload.bindLabel}"></h:outputText>
+
+ <h:outputText value="noDuplicate"></h:outputText>
+ <h:selectBooleanCheckbox value="#{fileUpload.noDuplicate}">
+ <a4j:support event="onchange" reRender="fileUploadID"></a4j:support>
+ </h:selectBooleanCheckbox>
+
+ <h:outputText value="Uploaded data:"></h:outputText>
+ <h:outputText value="#{fileUpload.changedLabel}"></h:outputText>
</h:panelGrid>
</f:subview>
\ No newline at end of file
Modified: trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Converter.xml
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Converter.xml 2008-04-24 15:02:45 UTC (rev 8131)
+++ trunk/test-applications/jsp/src/main/webapp/WEB-INF/faces-config-Converter.xml 2008-04-24 15:32:18 UTC (rev 8132)
@@ -26,4 +26,8 @@
<converter-id>comboBoxConverter</converter-id>
<converter-class>util.converter.ComboBoxConverter</converter-class>
</converter>
+ <converter>
+ <converter-id>fileUploadConverter</converter-id>
+ <converter-class>util.converter.FileUploadConverter</converter-class>
+ </converter>
</faces-config>
Modified: trunk/test-applications/jsp/src/main/webapp/styles/styles.css
===================================================================
--- trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-04-24 15:02:45 UTC (rev 8131)
+++ trunk/test-applications/jsp/src/main/webapp/styles/styles.css 2008-04-24 15:32:18 UTC (rev 8132)
@@ -251,12 +251,5 @@
background-color: pink;
}
.test{
- color: red;
- background-color: span;
- font: italic;
- font-family: sans-serif;
- font-size: 12px;
- font-weight: bold;
- caption-side: top;
- border: thick;
+ color: green;
}
\ No newline at end of file
16 years, 8 months