JBoss Rich Faces SVN: r7058 - trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-21 11:20:42 -0400 (Fri, 21 Mar 2008)
New Revision: 7058
Modified:
trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
Log:
http://jira.jboss.com/jira/browse/RF-2687
Modified: trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js
===================================================================
--- trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-21 15:04:14 UTC (rev 7057)
+++ trunk/ui/inplaceInput/src/main/resources/org/richfaces/renderkit/html/scripts/inplaceinput.js 2008-03-21 15:20:42 UTC (rev 7058)
@@ -256,6 +256,9 @@
cancel : function() {
this.endEditableState();
this.tempValueKeeper.value = this.valueKeeper.value;
+ if (this.tempValueKeeper.value == "") {
+ this.setDefaultText();
+ }
switch (this.prevState) {
case Richfaces.InplaceInput.STATES[0] :
16 years, 10 months
JBoss Rich Faces SVN: r7057 - branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates.
by richfaces-svn-commits@lists.jboss.org
Author: maksimkaszynski
Date: 2008-03-21 11:04:14 -0400 (Fri, 21 Mar 2008)
New Revision: 7057
Modified:
branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
Log:
http://jira.jboss.com/jira/browse/RF-2173
Modified: branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx
===================================================================
--- branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2008-03-21 14:51:45 UTC (rev 7056)
+++ branches/3.1.x/ui/suggestionbox/src/main/resources/org/richfaces/renderkit/html/templates/table.jspx 2008-03-21 15:04:14 UTC (rev 7057)
@@ -3,14 +3,17 @@
xmlns:u='http:/jsf.exadel.com/template/util'
xmlns="http://www.w3.org/1999/xhtml">
- <table border="0" cellpadding="0" cellspacing="0" class="dr-sb-int-decor-table rich-sb-int-decor-table" width="100%" >
+ <table border="0" cellpadding="0" cellspacing="0" width="100%" >
<f:attribute name="id">
<f:call name="getContentId"/>
</f:attribute>
<f:call name="utils.encodePassThruWithExclusions">
<f:parameter value="styleClass,class,onclick,onselect,width,height,rows,frame,bgcolor,border,rules,cellpadding"/>
</f:call>
- <f:attribute name="class" property="styleClass"/>
+ <f:attribute name="class">
+ <f:verbatim value="dr-sb-int-decor-table rich-sb-int-decor-table "/>
+ <f:verbatim property="styleClass"/>
+ </f:attribute>
<colgroup>
<f:attribute name="span" context="columnsCount" mantadory="false"/>
</colgroup>
16 years, 10 months
JBoss Rich Faces SVN: r7056 - trunk/ui/calendar/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: vbaranov
Date: 2008-03-21 10:51:45 -0400 (Fri, 21 Mar 2008)
New Revision: 7056
Modified:
trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
http://jira.jboss.com/jira/browse/RF-997
Modified: trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
--- trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-21 14:36:28 UTC (rev 7055)
+++ trunk/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2008-03-21 14:51:45 UTC (rev 7056)
@@ -156,7 +156,7 @@
String selectedDateString = (String) requestParameterMap.get(clientId
+ "InputDate");
if (selectedDateString != null) {
- ((UICalendar) component).setSubmittedValue(selectedDateString);
+ ((UICalendar) component).setSubmittedValue(selectedDateString);
}
}
@@ -468,8 +468,19 @@
// Fix for myFaces 1.1.x RF-997
Date date;
if (calendar.isValid()) {
- Date submittedValue = calendar.getAsDate(calendar
- .getSubmittedValue());
+ // Hack. Use converter in "Render response" phase
+ // in order to have java.util.Date object to highlight
+ // selected date in Calendar popup.
+ Date submittedValue = null;
+ try {
+ submittedValue = calendar.getAsDate(calendar.getSubmittedValue());
+ } catch(ConverterException ce) {
+ // ignore ConverterException for the case when the user
+ // has entered invalid date and there was no validation
+ // (and conversion) before, i.e. the form submit has attribute
+ // "immediate" = true; and Calendar has "immediate" = false
+ submittedValue = null;
+ }
if (submittedValue != null) {
date = submittedValue;
} else {
16 years, 10 months
JBoss Rich Faces SVN: r7055 - trunk/ui/columns/src/main/config/component.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-03-21 10:36:28 -0400 (Fri, 21 Mar 2008)
New Revision: 7055
Modified:
trunk/ui/columns/src/main/config/component/columns.xml
Log:
RF-2504
Modified: trunk/ui/columns/src/main/config/component/columns.xml
===================================================================
--- trunk/ui/columns/src/main/config/component/columns.xml 2008-03-21 14:33:10 UTC (rev 7054)
+++ trunk/ui/columns/src/main/config/component/columns.xml 2008-03-21 14:36:28 UTC (rev 7055)
@@ -40,6 +40,13 @@
</description>
</property>
<property>
+ <name>var</name>
+ <classname>java.lang.Object</classname>
+ <description>
+ The current variable
+ </description>
+ </property>
+ <property>
<name>columns</name>
<classname>java.lang.Object</classname>
<description>
16 years, 10 months
JBoss Rich Faces SVN: r7054 - Reports/3.2.0 and 1 other directory.
by richfaces-svn-commits@lists.jboss.org
Author: mvitenkov
Date: 2008-03-21 10:33:10 -0400 (Fri, 21 Mar 2008)
New Revision: 7054
Added:
trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR321032008mvitenkov.xls
Log:
Added: trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR321032008mvitenkov.xls
===================================================================
(Binary files differ)
Property changes on: trunk/test-applications/qa/Test Reports/3.2.0/DailyReport320CR321032008mvitenkov.xls
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
16 years, 10 months
JBoss Rich Faces SVN: r7053 - trunk/samples/inplaceSelect-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-21 10:33:03 -0400 (Fri, 21 Mar 2008)
New Revision: 7053
Modified:
trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp
Log:
Modified: trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp 2008-03-21 14:29:38 UTC (rev 7052)
+++ trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp 2008-03-21 14:33:03 UTC (rev 7053)
@@ -122,15 +122,15 @@
valueChangeListener="#{bean.valueChange}"
layout="block"
>
- <f:selectItem itemLabel="option 1" itemValue="Kansas City"/>
- <f:selectItem itemLabel="option 2" itemValue="Las Vegas"/>
- <f:selectItem itemLabel="option 3" itemValue="Oklahoma City"/>
- <f:selectItem itemLabel="option 4" itemValue="New Jersey"/>
- <f:selectItem itemLabel="option 5" itemValue="Detroit"/>
- <f:selectItem itemLabel="option 6" itemValue="Toronto"/>
- <f:selectItem itemLabel="option 7" itemValue="Cleveland"/>
- <f:selectItem itemLabel="option 8" itemValue="Indianapolis"/>
- <f:selectItem itemLabel="option 9" itemValue="New York"/>
+ <f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
+ <f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
+ <f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
+ <f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
+ <f:selectItem itemValue="option 5" itemLabel="Detroit"/>
+ <f:selectItem itemValue="option 6" itemLabel="Toronto"/>
+ <f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
+ <f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
+ <f:selectItem itemValue="option 9" itemLabel="New York"/>
</is:inplaceSelect>
</td>
<td>
@@ -151,15 +151,15 @@
valueChangeListener="#{bean.valueChange}"
layout="block"
>
- <f:selectItem itemLabel="option 1" itemValue="Kansas City"/>
- <f:selectItem itemLabel="option 2" itemValue="Las Vegas"/>
- <f:selectItem itemLabel="option 3" itemValue="Oklahoma City"/>
- <f:selectItem itemLabel="option 4" itemValue="New Jersey"/>
- <f:selectItem itemLabel="option 5" itemValue="Detroit"/>
- <f:selectItem itemLabel="option 6" itemValue="Toronto"/>
- <f:selectItem itemLabel="option 7" itemValue="Cleveland"/>
- <f:selectItem itemLabel="option 8" itemValue="Indianapolis"/>
- <f:selectItem itemLabel="option 9" itemValue="New York"/>
+ <f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
+ <f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
+ <f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
+ <f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
+ <f:selectItem itemValue="option 5" itemLabel="Detroit"/>
+ <f:selectItem itemValue="option 6" itemLabel="Toronto"/>
+ <f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
+ <f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
+ <f:selectItem itemValue="option 9" itemLabel="New York"/>
</is:inplaceSelect>
</td>
</tr>
@@ -182,15 +182,15 @@
valueChangeListener="#{bean.valueChange}"
layout="block"
>
- <f:selectItem itemLabel="option 1" itemValue="Kansas City"/>
- <f:selectItem itemLabel="option 2" itemValue="Las Vegas"/>
- <f:selectItem itemLabel="option 3" itemValue="Oklahoma City"/>
- <f:selectItem itemLabel="option 4" itemValue="New Jersey"/>
- <f:selectItem itemLabel="option 5" itemValue="Detroit"/>
- <f:selectItem itemLabel="option 6" itemValue="Toronto"/>
- <f:selectItem itemLabel="option 7" itemValue="Cleveland"/>
- <f:selectItem itemLabel="option 8" itemValue="Indianapolis"/>
- <f:selectItem itemLabel="option 9" itemValue="New York"/>
+ <f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
+ <f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
+ <f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
+ <f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
+ <f:selectItem itemValue="option 5" itemLabel="Detroit"/>
+ <f:selectItem itemValue="option 6" itemLabel="Toronto"/>
+ <f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
+ <f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
+ <f:selectItem itemValue="option 9" itemLabel="New York"/>
</is:inplaceSelect>
</td>
<td>
@@ -211,15 +211,15 @@
valueChangeListener="#{bean.valueChange}"
layout="block"
>
- <f:selectItem itemLabel="option 1" itemValue="Kansas City"/>
- <f:selectItem itemLabel="option 2" itemValue="Las Vegas"/>
- <f:selectItem itemLabel="option 3" itemValue="Oklahoma City"/>
- <f:selectItem itemLabel="option 4" itemValue="New Jersey"/>
- <f:selectItem itemLabel="option 5" itemValue="Detroit"/>
- <f:selectItem itemLabel="option 6" itemValue="Toronto"/>
- <f:selectItem itemLabel="option 7" itemValue="Cleveland"/>
- <f:selectItem itemLabel="option 8" itemValue="Indianapolis"/>
- <f:selectItem itemLabel="option 9" itemValue="New York"/>
+ <f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
+ <f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
+ <f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
+ <f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
+ <f:selectItem itemValue="option 5" itemLabel="Detroit"/>
+ <f:selectItem itemValue="option 6" itemLabel="Toronto"/>
+ <f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
+ <f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
+ <f:selectItem itemValue="option 9" itemLabel="New York"/>
</is:inplaceSelect>
</td>
</tr>
@@ -242,15 +242,15 @@
valueChangeListener="#{bean.valueChange}"
layout="block"
>
- <f:selectItem itemLabel="option 1" itemValue="Kansas City"/>
- <f:selectItem itemLabel="option 2" itemValue="Las Vegas"/>
- <f:selectItem itemLabel="option 3" itemValue="Oklahoma City"/>
- <f:selectItem itemLabel="option 4" itemValue="New Jersey"/>
- <f:selectItem itemLabel="option 5" itemValue="Detroit"/>
- <f:selectItem itemLabel="option 6" itemValue="Toronto"/>
- <f:selectItem itemLabel="option 7" itemValue="Cleveland"/>
- <f:selectItem itemLabel="option 8" itemValue="Indianapolis"/>
- <f:selectItem itemLabel="option 9" itemValue="New York"/>
+ <f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
+ <f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
+ <f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
+ <f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
+ <f:selectItem itemValue="option 5" itemLabel="Detroit"/>
+ <f:selectItem itemValue="option 6" itemLabel="Toronto"/>
+ <f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
+ <f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
+ <f:selectItem itemValue="option 9" itemLabel="New York"/>
</is:inplaceSelect>
</td>
<td>
@@ -271,15 +271,15 @@
valueChangeListener="#{bean.valueChange}"
layout="block"
>
- <f:selectItem itemLabel="option 1" itemValue="Kansas City"/>
- <f:selectItem itemLabel="option 2" itemValue="Las Vegas"/>
- <f:selectItem itemLabel="option 3" itemValue="Oklahoma City"/>
- <f:selectItem itemLabel="option 4" itemValue="New Jersey"/>
- <f:selectItem itemLabel="option 5" itemValue="Detroit"/>
- <f:selectItem itemLabel="option 6" itemValue="Toronto"/>
- <f:selectItem itemLabel="option 7" itemValue="Cleveland"/>
- <f:selectItem itemLabel="option 8" itemValue="Indianapolis"/>
- <f:selectItem itemLabel="option 9" itemValue="New York"/>
+ <f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
+ <f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
+ <f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
+ <f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
+ <f:selectItem itemValue="option 5" itemLabel="Detroit"/>
+ <f:selectItem itemValue="option 6" itemLabel="Toronto"/>
+ <f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
+ <f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
+ <f:selectItem itemValue="option 9" itemLabel="New York"/>
</is:inplaceSelect>
</td>
</tr>
16 years, 10 months
JBoss Rich Faces SVN: r7052 - trunk/samples/inplaceSelect-sample/src/main/webapp/pages.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-21 10:29:38 -0400 (Fri, 21 Mar 2008)
New Revision: 7052
Modified:
trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp
Log:
Modified: trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp
===================================================================
--- trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp 2008-03-21 14:28:35 UTC (rev 7051)
+++ trunk/samples/inplaceSelect-sample/src/main/webapp/pages/index.jsp 2008-03-21 14:29:38 UTC (rev 7052)
@@ -1,5 +1,6 @@
<%@ 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/inplaceSelect" prefix="is"%>
<html>
<head>
@@ -65,7 +66,7 @@
Fresh off his victory in the Florida primary, Sen. John McCain is poised to take another big prize. Former
<is:inplaceSelect
- id="aaaa"
+ id="inplace"
editEvent="#{bean.editEvent}"
maxSelectWidth="#{bean.maxSelectWidth}"
minSelectWidth="#{bean.minSelectWidth}"
@@ -82,16 +83,18 @@
valueChangeListener="#{bean.valueChange}"
layout="inline"
>
- <f:selectItem itemLabel="option 1" itemValue="Kansas City"/>
- <f:selectItem itemLabel="option 2" itemValue="Las Vegas"/>
- <f:selectItem itemLabel="option 3" itemValue="Oklahoma City"/>
- <f:selectItem itemLabel="option 4" itemValue="New Jersey"/>
- <f:selectItem itemLabel="option 5" itemValue="Detroit"/>
- <f:selectItem itemLabel="option 6" itemValue="Toronto"/>
- <f:selectItem itemLabel="option 7" itemValue="Cleveland"/>
- <f:selectItem itemLabel="option 8" itemValue="Indianapolis"/>
- <f:selectItem itemLabel="option 9" itemValue="New York"/>
+ <f:selectItem itemValue="option 1" itemLabel="Kansas City"/>
+ <f:selectItem itemValue="option 2" itemLabel="Las Vegas"/>
+ <f:selectItem itemValue="option 3" itemLabel="Oklahoma City"/>
+ <f:selectItem itemValue="option 4" itemLabel="New Jersey"/>
+ <f:selectItem itemValue="option 5" itemLabel="Detroit"/>
+ <f:selectItem itemValue="option 6" itemLabel="Toronto"/>
+ <f:selectItem itemValue="option 7" itemLabel="Cleveland"/>
+ <f:selectItem itemValue="option 8" itemLabel="Indianapolis"/>
+ <f:selectItem itemValue="option 9" itemLabel="New York"/>
</is:inplaceSelect>
+ <a4j:commandButton reRender="inplace" value="12312"></a4j:commandButton>
+
Mayor Rudy Giuliani plans to drop out and endorse McCain, two GOP sources said. That would give McCain added momentum heading into a debate Wednesday and next week's Super Tuesday contests
<br/>
@@ -281,7 +284,6 @@
</td>
</tr>
</table>
-
</h:form>
</f:view>
</body>
16 years, 10 months
JBoss Rich Faces SVN: r7051 - trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit.
by richfaces-svn-commits@lists.jboss.org
Author: abelevich
Date: 2008-03-21 10:28:35 -0400 (Fri, 21 Mar 2008)
New Revision: 7051
Modified:
trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
Log:
add creation of JSONArray with label/value JSONArrays
Modified: trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java
===================================================================
--- trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-03-21 14:01:37 UTC (rev 7050)
+++ trunk/ui/inplaceSelect/src/main/java/org/richfaces/renderkit/InplaceSelectBaseRenderer.java 2008-03-21 14:28:35 UTC (rev 7051)
@@ -14,11 +14,13 @@
import javax.faces.context.ResponseWriter;
import javax.faces.model.SelectItem;
+import org.ajax4jsf.javascript.ScriptUtils;
import org.ajax4jsf.util.InputUtils;
import org.ajax4jsf.util.SelectUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.richfaces.component.UIInplaceSelect;
+import org.richfaces.json.JSONArray;
/**
* InplaceSelect base renderer implementation
@@ -65,21 +67,34 @@
}
public void encodeItems(FacesContext context, UIComponent component) throws IOException {
- List values = new ArrayList();
+ List <String> labels = new ArrayList<String>();
ResponseWriter writer = context.getResponseWriter();
-
+ JSONArray jsonParentArray = new JSONArray();
+
List<SelectItem> selectItems = SelectUtils.getSelectItems(context, component);
if (!selectItems.isEmpty()) {
for (Iterator<SelectItem> iterator = selectItems.iterator(); iterator.hasNext();) {
SelectItem selectItem = iterator.next();
String value = getConvertedStringValue(context, component, selectItem.getValue());
- values.add(value);
- encodeSuggestion(writer, component, value, RICH_INPLACE_SELECT_CLASSES);
+ String label = selectItem.getLabel();
+ labels.add(label);
+
+ encodeSuggestion(writer, component, label, RICH_INPLACE_SELECT_CLASSES);
+
+ JSONArray jsonChildArray = new JSONArray();
+ jsonChildArray.put(label);
+ jsonChildArray.put(value);
+ jsonParentArray.put(jsonChildArray);
}
}
- setValuesList(values);
+ setValuesList(labels);
+ StringBuffer attributes = new StringBuffer();
+ attributes.append("var options = ");
+ attributes.append(jsonParentArray.toString());
+ attributes.append(";");
+ writer.write(attributes.toString());
}
-
+
public void encodeControlsFacet(FacesContext context, UIComponent component) throws IOException {
UIComponent facet = component.getFacet(CONTROLS_FACET);
if ((facet != null) && (facet.isRendered())) {
16 years, 10 months
JBoss Rich Faces SVN: r7050 - in trunk/ui/fileUpload/src/main: java/org/richfaces/component and 2 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: andrei_exadel
Date: 2008-03-21 10:01:37 -0400 (Fri, 21 Mar 2008)
New Revision: 7050
Modified:
trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js
Log:
fix upload listener event
Modified: trunk/ui/fileUpload/src/main/config/component/fileUpload.xml
===================================================================
--- trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-03-21 13:58:30 UTC (rev 7049)
+++ trunk/ui/fileUpload/src/main/config/component/fileUpload.xml 2008-03-21 14:01:37 UTC (rev 7050)
@@ -55,6 +55,12 @@
<superclassname>org.ajax4jsf.tests.AbstractJspTestCase</superclassname>
</test>
</tag>
+ <taghandler generate="true">
+ <classname>org.richfaces.taglib.FileUploadTagHandler</classname>
+ <superclass>
+ com.sun.facelets.tag.jsf.ComponentHandler
+ </superclass>
+ </taghandler>
&ui_component_attributes;
&ui_input_attributes;
&html_style_attributes;
@@ -160,7 +166,7 @@
</property>
<property>
<name>fileUploadListener</name>
- <classname>javax.el.MethodExpression</classname>
+ <classname>javax.faces.el.MethodBinding</classname>
<description>
MethodExpression representing an action listener method
that will be notified after file uploaded.
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-03-21 13:58:30 UTC (rev 7049)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/component/UIFileUpload.java 2008-03-21 14:01:37 UTC (rev 7050)
@@ -13,6 +13,7 @@
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.faces.convert.Converter;
+import javax.faces.el.MethodBinding;
import javax.faces.event.FacesEvent;
import javax.servlet.http.HttpServletRequest;
@@ -126,9 +127,9 @@
public abstract void setLocale(Object locale);
- public abstract MethodExpression getFileUploadListener();
+ public abstract MethodBinding getFileUploadListener();
- public abstract void setFileUploadListener(MethodExpression scrollerListener);
+ public abstract void setFileUploadListener(MethodBinding scrollerListener);
public void addFileUploadListener(FileUploadListener listener) {
addFacesListener(listener);
@@ -152,15 +153,11 @@
public void broadcast(FacesEvent e) {
- //super.broadcast(e);
-
if (e instanceof UploadEvent) {
- // XXX BTW, why doesn't UploadEvent accept any listeners?
-
FacesContext facesContext = FacesContext.getCurrentInstance();
- MethodExpression binding = getFileUploadListener();
+ MethodBinding binding = getFileUploadListener();
if (binding != null) {
- binding.invoke(facesContext.getELContext(), new Object[] { e });
+ binding.invoke(facesContext, new Object[] { e });
}
} else {
Modified: trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java
===================================================================
--- trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-03-21 13:58:30 UTC (rev 7049)
+++ trunk/ui/fileUpload/src/main/java/org/richfaces/renderkit/FileUploadRendererBase.java 2008-03-21 14:01:37 UTC (rev 7050)
@@ -360,6 +360,7 @@
collection.add(item);
}
}
+// fileUpload.queueEvent(new UploadEvent(fileUpload, item));
new UploadEvent(fileUpload, item).queue();
}
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-03-21 13:58:30 UTC (rev 7049)
+++ trunk/ui/fileUpload/src/main/resources/org/richfaces/renderkit/html/js/FileUpload.js 2008-03-21 14:01:37 UTC (rev 7050)
@@ -414,7 +414,6 @@
this.checkFrame();
this.initFileEntryWidth();
this.initLabels(labels);
- this.element.onload = function () {this.initFileInput();}.bind(this);
this.initFileInput();
},
@@ -433,16 +432,16 @@
if (p.getWidth() != 0) {
o.style.width = p.getWidth() + "px";
o.style.height = p.getHeight() + "px";
- p.onclick = null;
+ p.onmouseover = null;
}else {
o.style.width = "30px";
o.style.height = "10px";
- p.onclick = function () {this.initFileInput();}.bind(this);
+ p.onmouseover = function () {this.initFileInput();}.bind(this);
}
},
initFileEntryWidth: function () {
- var w = this.element.clientWidth - 115;
+ var w = this.element.getWidth() - 115;
this.fileEntryWidth = w;
var progressW = this._progressBar.style.width;
if (progressW == "") { progressW = 200; }
16 years, 10 months
JBoss Rich Faces SVN: r7049 - in trunk/samples/richfaces-demo/src/main/webapp: richfaces/componentControl/examples and 11 other directories.
by richfaces-svn-commits@lists.jboss.org
Author: dsvyatobatsko
Date: 2008-03-21 09:58:30 -0400 (Fri, 21 Mar 2008)
New Revision: 7049
Modified:
trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/examples/recursiveAdaptor.xhtml
trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/usage.xhtml
trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
Log:
Shotgun surgery: some marginal changes
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/calendar/examples/calSample.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -15,7 +15,7 @@
<h:form>
- <h:panelGrid id="panel" columns="2" width="100%" columnClasses="ecol1, ecol2">
+ <h:panelGrid id="panel" columns="2" columnClasses="ecol1, ecol2">
<a4j:outputPanel id="calendar" layout="block">
<rich:calendar value="#{calendarBean.selectedDate}"
locale="#{calendarBean.locale}"
@@ -24,7 +24,6 @@
showApplyButton="#{calendarBean.showApply}"/>
</a4j:outputPanel>
-
<h:panelGrid columns="2">
<h:outputText value="Popup Mode:" />
<h:selectBooleanCheckbox value="#{calendarBean.popup}">
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/cmenuusage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -6,7 +6,10 @@
xmlns:rich="http://richfaces.org/rich" id="subview">
<style>
.cur{
- cursor:pointer;
+ cursor: pointer;
+ }
+ .top{
+ vertical-align: top;
}
</style>
<h:form id="form">
@@ -30,9 +33,9 @@
</rich:menuItem>
</rich:menuGroup>
</rich:contextMenu>
-
- <h:panelGrid columns="2">
-
+
+ <h:panelGrid columns="2" columnClasses="top, top">
+
<rich:dataTable value="#{dataTableScrollerBean.tenRandomCars}" var="car" id="table"
onRowMouseOver="this.style.backgroundColor='#F8F8F8'"
onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" rowClasses="cur">
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/componentControl/examples/mpusage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -23,6 +23,5 @@
<h:outputLink value="#" id="link">
Show Modal Panel
<rich:componentControl for="panel" attachTo="link" operation="show" event="onclick"/>
- </h:outputLink>
- <br/><br/><br/>
+ </h:outputLink>
</f:subview>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/example/menu.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -16,8 +16,6 @@
}
</style>
<h:panelGrid columns="1" columnClasses="cent">
-
- <h:outputText value="Perform right-click on the picture to call the menu" style="font-weight:bold" id="label"/>
<h:panelGroup id="picture">
<h:graphicImage value="/richfaces/jQuery/images/pic1.jpg" id="pic"/>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/contextMenu/usage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -37,7 +37,7 @@
<p>Context menu itself is an invisible panel
that appears after a particular client side event (onmouseover, onclick etc) occured on a parent component.
The event is defined with an <b>event</b> attribute.</p>
- <p>
+ <p class="note">
<i><b>Note:</b> As you can see from the first example the component could use "oncontextmenu" event to call the Menu on right click event.
But in this case the component should be called via <b>componentControl</b> component (as it is shown at the second example) rather than using a4j:support style.
If a4j:support style is used then many of the components don't encode this event and also in case of support-like definition the component will not work properly.
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/examples/topmenu.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -53,7 +53,7 @@
</rich:dropDownMenu>
</rich:toolBar>
</h:form>
- <img src="images/spacer.gif" width="1" height="25" alt="" border="0"/><br/>
+ <img src="images/spacer.gif" width="1" height="5" alt="" border="0"/><br/>
<a4j:outputPanel ajaxRendered="true">
<h:outputText value="Current Selection: "></h:outputText>
<h:outputText style="font-weight:bold" value="#{ddmenu.current}"></h:outputText>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/dropDownMenu/usage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -18,6 +18,7 @@
<div class="sample-container">
<ui:include src="/richfaces/dropDownMenu/examples/topmenu.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/dropDownMenu/examples/topmenu.xhtml"/>
</ui:include>
@@ -39,6 +40,7 @@
You can place a block of drop down menus horizontally or vertially how it is shown below. <br/><br/>
<ui:include src="/richfaces/dropDownMenu/examples/sidemenu.xhtml"/>
<br/><img src="images/spacer.gif" width="1" height="25" alt="" border="0"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/dropDownMenu/examples/sidemenu.xhtml"/>
</ui:include>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/modalPanel/usage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -17,8 +17,9 @@
<div class="sample-container">
This line code invokes the modal panel:<br/>
<a href="javascript:Richfaces.showModalPanel('mp',{width:450, top:200})">
- Richfaces.showModalPanel('mp',{width:450, top:200})</a><br/><br/><br/>
+ Richfaces.showModalPanel('mp',{width:450, top:200})</a><br/><br/>
<ui:include src="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/modalPanel/examples/simplePanel.xhtml"/>
<ui:param name="openlabel" value="View Page Source" />
@@ -33,6 +34,7 @@
<legend class="demo_legend">Example 2</legend>
<div class="sample-container">
<ui:include src="/richfaces/componentControl/examples/mpusage.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/componentControl/examples/mpusage.xhtml"/>
<ui:param name="openlabel" value="View Page Source" />
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/panel/usage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -34,6 +34,7 @@
<div class="sample-container" >
<ui:include src="/richfaces/panel/examples/simplePanel.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/panel/examples/simplePanel.xhtml"/>
</ui:include>
@@ -47,6 +48,7 @@
<div class="sample-container" >
<ui:include src="/richfaces/panel/examples/headlessPanel.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/panel/examples/headlessPanel.xhtml"/>
</ui:include>
@@ -58,7 +60,9 @@
<div class="sample-container" >
The panels can be nested:
+ <br/><br/>
<ui:include src="/richfaces/panel/examples/nestedPanels.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/panel/examples/nestedPanels.xhtml"/>
</ui:include>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/panelBar/usage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -18,6 +18,7 @@
<div class="sample-container" >
<ui:include src="/richfaces/panelBar/examples/example.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/panelBar/examples/example.xhtml"/>
</ui:include>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/tree/usage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -21,6 +21,7 @@
<legend class="demo_legend">Ajax switch type</legend>
<div class="sample-container">
<ui:include src="/richfaces/tree/examples/ajaxTree.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/tree/examples/ajaxTree.xhtml"/>
</ui:include>
@@ -31,6 +32,7 @@
<div class="sample-container" >
<ui:include src="/richfaces/tree/examples/clientTree.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/tree/examples/clientTree.xhtml"/>
</ui:include>
@@ -40,6 +42,7 @@
<legend class="demo_legend">Server switch type</legend>
<div class="sample-container" >
<ui:include src="/richfaces/tree/examples/serverTree.xhtml"/>
+ <br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/tree/examples/serverTree.xhtml"/>
</ui:include>
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/examples/recursiveAdaptor.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/examples/recursiveAdaptor.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/examples/recursiveAdaptor.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -5,12 +5,10 @@
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich">
- <rich:separator height="1" style="padding:10px 0" />
<h:form>
<rich:tree style="width:300px" switchType="ajax" stateAdvisor="#{treeDemoStateAdvisor}">
<rich:recursiveTreeNodesAdaptor roots="#{fileSystemBean.sourceRoots}" var="item" nodes="#{item.nodes}" />
</rich:tree>
</h:form>
- <rich:separator height="1" style="padding:10px 0" />
</ui:composition>
\ No newline at end of file
Modified: trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/usage.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/usage.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/richfaces/treeNodesAdaptor/usage.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -26,24 +26,29 @@
<h:panelGroup rendered="#{not empty fileSystemBean.sourceRoots}">
<div class="sample-container" >
<ui:include src="/richfaces/treeNodesAdaptor/examples/recursiveAdaptor.xhtml"/>
+ <br/><br/><br/><br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/richfaces/treeNodesAdaptor/examples/recursiveAdaptor.xhtml"/>
- </ui:include>
+ </ui:include>
+ <br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/treemodeladaptor/FileSystemBean.java"/>
<ui:param name="openlabel" value="View FileSystemBean.java Source" />
<ui:param name="sourcetype" value="java" />
- </ui:include>
+ </ui:include>
+ <br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/treemodeladaptor/FileSystemNode.java"/>
<ui:param name="openlabel" value="View FileSystemNode.java Source" />
<ui:param name="sourcetype" value="java" />
- </ui:include>
+ </ui:include>
+ <br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/treemodeladaptor/PostbackPhaseListener.java"/>
<ui:param name="openlabel" value="View PostbackPhaseListener.java Source" />
<ui:param name="sourcetype" value="java" />
- </ui:include>
+ </ui:include>
+ <br/>
<ui:include src="/templates/include/sourceview.xhtml">
<ui:param name="sourcepath" value="/WEB-INF/src/org/richfaces/treemodeladaptor/TreeDemoStateAdvisor.java"/>
<ui:param name="openlabel" value="View TreeDemoStateAdvisor.java Source" />
Modified: trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml
===================================================================
--- trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-03-21 13:47:32 UTC (rev 7048)
+++ trunk/samples/richfaces-demo/src/main/webapp/templates/include/sourceview.xhtml 2008-03-21 13:58:30 UTC (rev 7049)
@@ -6,7 +6,6 @@
xmlns:rich="http://richfaces.org/rich">
<ui:composition>
- <br/><br/>
<script>
//<![CDATA[
Effect.Transitions.exponential = function(pos) {
16 years, 10 months