Author: ppitonak(a)redhat.com
Date: 2011-10-19 03:05:14 -0400 (Wed, 19 Oct 2011)
New Revision: 22820
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
Log:
fixed two server-side listeners
added two JavaScript event handlers for file upload
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-10-18
10:00:01 UTC (rev 22819)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/RichBean.java 2011-10-19
07:05:14 UTC (rev 22820)
@@ -430,8 +430,8 @@
* @param event
* an event representing the activation of a user interface component
*/
- public void changeEventListener(ValueChangeEvent event) {
- logToPage("*2 value changed: " + event.getOldValue() + " ->
" + event.getNewValue());
+ public void changeEventListener(AjaxBehaviorEvent event) {
+ logToPage("*2 value changed ");
}
Modified:
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java
===================================================================
---
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java 2011-10-18
10:00:01 UTC (rev 22819)
+++
modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tests/metamer/bean/rich/RichCalendarBean.java 2011-10-19
07:05:14 UTC (rev 22820)
@@ -47,7 +47,7 @@
/**
* Managed bean for rich:calendar.
- *
+ *
* @author <a href="mailto:ppitonak@redhat.com">Pavol Pitonak</a>
* @version $Revision$
*/
@@ -149,7 +149,7 @@
/**
* A value change listener that logs to the page old and new value.
- *
+ *
* @param event
* an event representing the activation of a user interface component
*/
@@ -161,10 +161,18 @@
String newDate = "null";
if (event.getOldValue() != null) {
- oldDate = sdf.format((Date) event.getOldValue());
+ if (event.getOldValue() instanceof String) {
+ oldDate = (String) event.getOldValue();
+ } else {
+ oldDate = sdf.format((Date) event.getOldValue());
+ }
}
if (event.getNewValue() != null) {
- newDate = sdf.format((Date) event.getNewValue());
+ if (event.getNewValue() instanceof String) {
+ newDate = (String) event.getNewValue();
+ } else {
+ newDate = sdf.format((Date) event.getNewValue());
+ }
}
RichBean.logToPage("* value changed: " + oldDate + " -> "
+ newDate);
@@ -180,7 +188,7 @@
int componentYear = cal.get(Calendar.YEAR);
FacesMessage message = new FacesMessage(FacesMessage.SEVERITY_ERROR, "Date
too far in the past.",
- "Select a date from year 1991 or newer.");
+ "Select a date from year 1991 or newer.");
if (componentYear < 1991) {
FacesContext.getCurrentInstance().addMessage("form:calendar",
message);
Modified:
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml
===================================================================
---
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-10-18
10:00:01 UTC (rev 22819)
+++
modules/tests/metamer/trunk/application/src/main/webapp/components/richFileUpload/simple.xhtml 2011-10-19
07:05:14 UTC (rev 22820)
@@ -55,6 +55,7 @@
noDuplicate="#{richFileUploadBean.attributes['noDuplicate'].value}"
onbeforedomupdate="#{richFileUploadBean.attributes['onbeforedomupdate'].value}"
onbegin="#{richFileUploadBean.attributes['onbegin'].value}"
+
onclear="#{richFileUploadBean.attributes['onclear'].value}"
onclick="#{richFileUploadBean.attributes['onclick'].value}"
oncomplete="#{richFileUploadBean.attributes['oncomplete'].value}"
ondblclick="#{richFileUploadBean.attributes['ondblclick'].value}"
@@ -67,6 +68,7 @@
onmouseout="#{richFileUploadBean.attributes['onmouseout'].value}"
onmouseover="#{richFileUploadBean.attributes['onmouseover'].value}"
onmouseup="#{richFileUploadBean.attributes['onmouseup'].value}"
+
ontyperejected="#{richFileUploadBean.attributes['ontyperejected'].value}"
onuploadcomplete="#{richFileUploadBean.attributes['onuploadcomplete'].value}"
render="#{richFileUploadBean.attributes['render'].value}"
rendered="#{richFileUploadBean.attributes['rendered'].value}"
Show replies by date