JBoss Rich Faces SVN: r6428 - trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: vmolotkov
Date: 2008-02-28 11:54:07 -0500 (Thu, 28 Feb 2008)
New Revision: 6428
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
Log:
openOnEdit attribute was added
Modified: trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-28 16:46:00 UTC (rev 6427)
+++ trunk/sandbox/ui/inplaceSelect/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceselect.js 2008-02-28 16:54:07 UTC (rev 6428)
@@ -23,6 +23,9 @@
} else {
this.tempValueKeeper.focus();
}
+ if (this.attributes.openOnEdit && !this.comboList.isList) {
+ this.comboList.showWithDelay();
+ }
},
tempKeeperClickHandler : function() {
16 years, 10 months
JBoss Rich Faces SVN: r6427 - trunk/sandbox/ui/inplaceSelect/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 11:46:00 -0500 (Thu, 28 Feb 2008)
New Revision: 6427
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
add openOnEdit attribute
Modified: trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-28 16:45:07 UTC (rev 6426)
+++ trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-28 16:46:00 UTC (rev 6427)
@@ -168,7 +168,8 @@
horizontalPosition : '#{component.attributes["controlsHorizontalPosition"]}',
inputWidth : '#{component.attributes["selectWidth"]}',
minInputWidth : '#{component.attributes["minSelectWidth"]}',
- MaxInputWidth : '#{component.attributes["maxSelectWidth"]}'
+ maxInputWidth : '#{component.attributes["maxSelectWidth"]}',
+ openOnEdit:'#{component.attributes["openOnEdit"]}'
};
var richInplaceSelEvents = {oneditactivation : #{this:getAsEventHandler(context, component, "oneditactivation")},
16 years, 10 months
JBoss Rich Faces SVN: r6426 - trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 11:45:07 -0500 (Thu, 28 Feb 2008)
New Revision: 6426
Modified:
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
Log:
remove openOnEdit
Modified: trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-28 16:25:03 UTC (rev 6425)
+++ trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-28 16:45:07 UTC (rev 6426)
@@ -124,7 +124,6 @@
options.addOption("inputWidth");
options.addOption("minInputWidth");
options.addOption("maxInputWidth");
- options.addOption("openOnEdit");
attributes.append(options.toScript());
return attributes.toString();
16 years, 10 months
JBoss Rich Faces SVN: r6425 - in trunk/sandbox/samples/fileUploadDemo/src/main: webapp/WEB-INF and 1 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-28 11:25:03 -0500 (Thu, 28 Feb 2008)
New Revision: 6425
Modified:
trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
Log:
update demo after component changes
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-28 16:24:32 UTC (rev 6424)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/java/org/richfaces/Bean.java 2008-02-28 16:25:03 UTC (rev 6425)
@@ -21,6 +21,7 @@
package org.richfaces;
+import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
@@ -28,6 +29,7 @@
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Set;
import org.richfaces.event.UploadEvent;
@@ -53,29 +55,25 @@
return flag;
}
- public List getFileList() {
- if (data != null) {
- List fileList = new ArrayList();
- for (Object o : data.keySet()) {
- String name = (String)o;
- File file = (File)data.get(o);
- if (file != null) {
- fileList.add(new FileData(name));
- }
- }
- return fileList;
- }
- return null;
+ public List getFileList () {
+ return data != null ? new ArrayList(data.keySet()) : null;
}
+
public void setFlag(boolean flag) {
this.flag = flag;
}
public void listener(UploadEvent event) throws IOException{
- File file = event.getFile();
- System.out.println("File : '" + event.getFileName() + "' was uploaded");
- System.out.println("Absolute Path : '" + file.getAbsolutePath() + "'!");
+ System.out.println("File : '" + event.getFileName() + "' was uploaded");
+ if (event.isFile()) {
+ File file = event.getFile();
+ System.out.println("Absolute Path : '" + file.getAbsolutePath() + "'!");
+ }else {
+ ByteArrayOutputStream b = new ByteArrayOutputStream();
+ b.write(event.getData());
+ System.out.println(b.toString());
+ }
}
/**
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-28 16:24:32 UTC (rev 6424)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/WEB-INF/web.xml 2008-02-28 16:25:03 UTC (rev 6425)
@@ -44,7 +44,7 @@
</init-param>
<init-param>
<param-name>maxRequestSize</param-name>
- <param-value>100000000</param-value>
+ <param-value>20000000</param-value>
</init-param>
</filter>
Modified: trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-28 16:24:32 UTC (rev 6424)
+++ trunk/sandbox/samples/fileUploadDemo/src/main/webapp/pages/index.jsp 2008-02-28 16:25:03 UTC (rev 6425)
@@ -59,7 +59,7 @@
<a4j:commandLink style="font-weight: bold; width: 200px;" value="Show files uploaded:" reRender="files_list"></a4j:commandLink><br/><br/>
<h:dataTable value="#{bean.fileList}" var="file" id="files_list" style="width: 500px">
<h:column>
- <h:outputText value="#{file.name}"></h:outputText>
+ <h:outputText value="#{file}"></h:outputText>
</h:column>
</h:dataTable>
16 years, 10 months
JBoss Rich Faces SVN: r6424 - in trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam: web and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-28 11:24:32 -0500 (Thu, 28 Feb 2008)
New Revision: 6424
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/web/MultipartRequest.java
Log:
refactoring after Upload event changed
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-28 16:23:01 UTC (rev 6423)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/ui/renderkit/FileUploadRendererBase.java 2008-02-28 16:24:32 UTC (rev 6424)
@@ -1,6 +1,5 @@
package org.richfaces.org.jboss.seam.ui.renderkit;
-import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
@@ -79,7 +78,7 @@
* @param map
* @return
*/
- private boolean checkFileCount (UIFileUpload fileUpload, Map<String, File> map) {
+ private boolean checkFileCount (UIFileUpload fileUpload, Map<String, Object> map) {
Integer max = fileUpload.getMaxFilesQuantity();
if (map != null && map.size() >= max) {
fileUpload.reset();
@@ -95,12 +94,12 @@
* @param file
*/
@SuppressWarnings("unchecked")
- private void storeData(FacesContext context, UIFileUpload fileUpload, File file) {
+ private void storeData(FacesContext context, UIFileUpload fileUpload, Object file) {
ValueExpression data = fileUpload.getValueExpression("data");
if (data != null) {
Class clazz = data.getType(context.getELContext());
if (clazz.isAssignableFrom(Map.class)) {
- Map<String, File> map = (Map<String, File>) data.getValue(context.getELContext());
+ Map<String, Object> map = (Map<String, Object>) data.getValue(context.getELContext());
if (checkFileCount(fileUpload, map)) {
map.put(fileUpload.getLocalFileName(), file);
}else {
@@ -116,7 +115,7 @@
* @param file
* @param fileUpload
*/
- private void onUploadComplete(FacesContext context, File file,
+ private void onUploadComplete(FacesContext context, Object file,
UIFileUpload fileUpload) {
storeData(context, fileUpload, file);
try {
Modified: trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartRequest.java
===================================================================
--- trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartRequest.java 2008-02-28 16:23:01 UTC (rev 6423)
+++ trunk/sandbox/ui/fileUpload/src/main/java/org/richfaces/org/jboss/seam/web/MultipartRequest.java 2008-02-28 16:24:32 UTC (rev 6424)
@@ -123,8 +123,13 @@
super(name);
}
- public File getFile() {
- return tempFile;
+ public Object getFile() {
+ if (null != tempFile) {
+ return tempFile;
+ }else if (null != bOut) {
+ return bOut.toByteArray();
+ }
+ return null;
}
public String getFilename() {
@@ -566,7 +571,7 @@
.getContentType() : null;
}
- public File getFile(String name) {
+ public Object getFile(String name) {
Param p = getParam(name);
return (p != null && p instanceof FileParam) ? ((FileParam) p)
.getFile() : null;
16 years, 10 months
JBoss Rich Faces SVN: r6423 - trunk/framework/api/src/main/java/org/richfaces/event.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-02-28 11:23:01 -0500 (Thu, 28 Feb 2008)
New Revision: 6423
Modified:
trunk/framework/api/src/main/java/org/richfaces/event/UploadEvent.java
Log:
Add bytes property to event
Modified: trunk/framework/api/src/main/java/org/richfaces/event/UploadEvent.java
===================================================================
--- trunk/framework/api/src/main/java/org/richfaces/event/UploadEvent.java 2008-02-28 16:14:36 UTC (rev 6422)
+++ trunk/framework/api/src/main/java/org/richfaces/event/UploadEvent.java 2008-02-28 16:23:01 UTC (rev 6423)
@@ -31,15 +31,31 @@
private static final long serialVersionUID = -7645197191376210068L;
private File file = null;
+ private byte [] data= null;
private String fileName = null;
- public UploadEvent(UIComponent component, File file, String fileName) {
+ public UploadEvent(UIComponent component, Object file, String fileName) {
super(component);
- this.file = file;
this.fileName = fileName;
+ init(file);
}
+ private void init (Object file) {
+ if (null == file) {
+ return;
+ }
+ if (file.getClass().isAssignableFrom(File.class)) {
+ this.file = (File)file;
+ }else if (file.getClass().isAssignableFrom(byte[].class)) {
+ this.data = (byte[])file;
+ }
+ }
+ public boolean isFile () {
+ return (null != file);
+ }
+
+
public boolean isAppropriateListener(FacesListener listener) {
return false;
}
@@ -57,5 +73,12 @@
public String getFileName() {
return fileName;
}
-
+
+ /**
+ * @return the fileData
+ */
+ public byte[] getData() {
+ return data;
+ }
+
}
16 years, 10 months
JBoss Rich Faces SVN: r6422 - management/design/inplaceSelect/design.
by richfaces-svn-commits@lists.jboss.org
Author: admitriev
Date: 2008-02-28 11:14:36 -0500 (Thu, 28 Feb 2008)
New Revision: 6422
Modified:
management/design/inplaceSelect/design/inplaceSelect.html
Log:
Modified: management/design/inplaceSelect/design/inplaceSelect.html
===================================================================
--- management/design/inplaceSelect/design/inplaceSelect.html 2008-02-28 16:08:19 UTC (rev 6421)
+++ management/design/inplaceSelect/design/inplaceSelect.html 2008-02-28 16:14:36 UTC (rev 6422)
@@ -14,7 +14,8 @@
.insel_changed_state{background-image:url(images/mark_changed.gif); background-position : top left; background-repeat : no-repeat;}
.insel_edit_state{position : relative; width : 100px;}
-.insel_field{background : #FEFFDA/*editBackgroundColor*/; padding : 0px 0px 0px 0px; border : 1px #BED6F8; /*panelBorderColor*/; margin : 0px; width : 112px; position : absolute; top:0px; left : 0px;background-image:url(images/mark_list.gif); background-position : center right; background-repeat : no-repeat;}
+.insel_field{background : #FEFFDA/*editBackgroundColor*/; padding : 0px 0px 0px 0px; border : 1px inset #BED6F8; /*panelBorderColor*/; margin : 0px; width : 112px; position : absolute; top:0px; left : 0px;}
+.insel_arrow{background : #FEFFDA/*editBackgroundColor*/; padding : 0px 0px 0px 0px; border : 0px;; margin : 0px; width : 12px; position : absolute; top:1px; left : 100px;background-image:url(images/mark_list.gif); background-position : center right; background-repeat : no-repeat;}
.insel_strut{width : 100px; height : 1px}
.insel_btn{
background : url(images/bg_btn.png) top repeat-x #C7D7EC; /*gradient - from generalBackgroundColor to tabBackgroundColor, background-color - tabBackgroundColor*/
@@ -74,6 +75,7 @@
<span class="insel_edit_state">
<img src="images/spacer.gif" class="insel_strut">
<input readonly="readonly" type="Text" value="New York" class="insel_field">
+ <input readonly="readonly" type="Text" value="" class="insel_arrow">
<div class="insel_btn_set">
<div class="insel_shadow">
<table cellpadding="0" cellspacing="0" border="0" class="insel_shadow_size">
16 years, 10 months
JBoss Rich Faces SVN: r6421 - trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive.
by richfaces-svn-commits@lists.jboss.org
Author: konstantin.mishin
Date: 2008-02-28 11:08:19 -0500 (Thu, 28 Feb 2008)
New Revision: 6421
Modified:
trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java
trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java
Log:
RF-1741
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java 2008-02-28 16:03:31 UTC (rev 6420)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanComparator2.java 2008-02-28 16:08:19 UTC (rev 6421)
@@ -43,7 +43,9 @@
Object p2 = w2.getProperty(prop);
if (p1 == p2 && p1 instanceof Comparator) {
result = ((Comparator<Object>)p1).compare(w1.getWrappedObject(), w2.getWrappedObject());
- } else if (p1 instanceof Comparable && p2 instanceof Comparable) {
+ } else if (p1 instanceof String && p2 instanceof String) {
+ result = ((String)p1).trim().compareToIgnoreCase(((String)p2).trim());
+ } if (p1 instanceof Comparable && p2 instanceof Comparable) {
result = ((Comparable<Object>) p1).compareTo(p2);
} else if (p1 == null && p2 != null) {
result = 1;
Modified: trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java
===================================================================
--- trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java 2008-02-28 16:03:31 UTC (rev 6420)
+++ trunk/framework/impl/src/main/java/org/richfaces/model/impl/expressive/WrappedBeanFilter.java 2008-02-28 16:08:19 UTC (rev 6421)
@@ -24,9 +24,12 @@
for (FilterField filterField : filterFields) {
if (filterField instanceof ExtendedFilterField) {
Object property = wrapper.getProperty(filterField.getExpression().getExpressionString());
- final String filterValue = ((ExtendedFilterField)filterField).getFilterValue();
- if(!(filterValue == null) && !property.toString().startsWith(filterValue)) {
- return false;
+ String filterValue = ((ExtendedFilterField)filterField).getFilterValue();
+ if(filterValue != null) {
+ filterValue = filterValue.trim().toUpperCase();
+ if(!property.toString().trim().toUpperCase().startsWith(filterValue)) {
+ return false;
+ }
}
} else {
Object property = wrapper.getProperty(filterField.getExpression().getExpressionString());
16 years, 10 months
JBoss Rich Faces SVN: r6420 - trunk/sandbox/ui/inplaceSelect/src/main/templates.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 11:03:31 -0500 (Thu, 28 Feb 2008)
New Revision: 6420
Modified:
trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
Log:
rename inputMin/MaxWidth to the min/maxInputWidth
Modified: trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx
===================================================================
--- trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-28 16:01:35 UTC (rev 6419)
+++ trunk/sandbox/ui/inplaceSelect/src/main/templates/inplaceselect.jspx 2008-02-28 16:03:31 UTC (rev 6420)
@@ -167,8 +167,8 @@
verticalPosition : '#{component.attributes["controlsVerticalPosition"]}',
horizontalPosition : '#{component.attributes["controlsHorizontalPosition"]}',
inputWidth : '#{component.attributes["selectWidth"]}',
- inputMinWidth : '#{component.attributes["minSelectWidth"]}',
- inputMaxWidth : '#{component.attributes["maxSelectWidth"]}'
+ minInputWidth : '#{component.attributes["minSelectWidth"]}',
+ MaxInputWidth : '#{component.attributes["maxSelectWidth"]}'
};
var richInplaceSelEvents = {oneditactivation : #{this:getAsEventHandler(context, component, "oneditactivation")},
16 years, 10 months
JBoss Rich Faces SVN: r6419 - trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-02-28 11:01:35 -0500 (Thu, 28 Feb 2008)
New Revision: 6419
Modified:
trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
Log:
Modified: trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java
===================================================================
--- trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-28 15:56:07 UTC (rev 6418)
+++ trunk/sandbox/ui/inplaceInput/src/main/java/org/richfaces/renderkit/InplaceInputBaseRenderer.java 2008-02-28 16:01:35 UTC (rev 6419)
@@ -122,8 +122,8 @@
options.addOption("verticalPosition", component.getAttributes().get("controlsVerticalPosition"));
options.addOption("horizontalPosition", component.getAttributes().get("controlsHorizontalPosition"));
options.addOption("inputWidth");
- options.addOption("inputMinWidth",component.getAttributes().get("minInputWidth"));
- options.addOption("inputMaxWidth",component.getAttributes().get("maxInputWidth"));
+ options.addOption("minInputWidth");
+ options.addOption("maxInputWidth");
options.addOption("openOnEdit");
attributes.append(options.toScript());
16 years, 10 months