From richfaces-svn-commits at lists.jboss.org Wed Oct 19 03:05:14 2011 Content-Type: multipart/mixed; boundary="===============7457144647264801769==" MIME-Version: 1.0 From: richfaces-svn-commits at lists.jboss.org To: richfaces-svn-commits at lists.jboss.org Subject: [richfaces-svn-commits] JBoss Rich Faces SVN: r22820 - in modules/tests/metamer/trunk/application/src/main: java/org/richfaces/tests/metamer/bean/rich and 1 other directories. Date: Wed, 19 Oct 2011 03:05:14 -0400 Message-ID: <201110190705.p9J75EaL022296@svn01.web.mwc.hst.phx2.redhat.com> --===============7457144647264801769== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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/test= s/metamer/bean/RichBean.java modules/tests/metamer/trunk/application/src/main/java/org/richfaces/test= s/metamer/bean/rich/RichCalendarBean.java modules/tests/metamer/trunk/application/src/main/webapp/components/richF= ileUpload/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/richfac= es/tests/metamer/bean/RichBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tes= ts/metamer/bean/RichBean.java 2011-10-18 10:00:01 UTC (rev 22819) +++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tes= ts/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() + " -> " + ev= ent.getNewValue()); + public void changeEventListener(AjaxBehaviorEvent event) { + logToPage("*2 value changed "); } = = Modified: modules/tests/metamer/trunk/application/src/main/java/org/richfac= es/tests/metamer/bean/rich/RichCalendarBean.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tes= ts/metamer/bean/rich/RichCalendarBean.java 2011-10-18 10:00:01 UTC (rev 228= 19) +++ modules/tests/metamer/trunk/application/src/main/java/org/richfaces/tes= ts/metamer/bean/rich/RichCalendarBean.java 2011-10-19 07:05:14 UTC (rev 228= 20) @@ -47,7 +47,7 @@ = /** * Managed bean for rich:calendar. - * + * = * @author Pavol Pitonak * @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 =3D "null"; = if (event.getOldValue() !=3D null) { - oldDate =3D sdf.format((Date) event.getOldValue()); + if (event.getOldValue() instanceof String) { + oldDate =3D (String) event.getOldValue(); + } else { + oldDate =3D sdf.format((Date) event.getOldValue()); + } } if (event.getNewValue() !=3D null) { - newDate =3D sdf.format((Date) event.getNewValue()); + if (event.getNewValue() instanceof String) { + newDate =3D (String) event.getNewValue(); + } else { + newDate =3D sdf.format((Date) event.getNewValue()); + } } = RichBean.logToPage("* value changed: " + oldDate + " -> " + newDat= e); @@ -180,7 +188,7 @@ int componentYear =3D cal.get(Calendar.YEAR); = FacesMessage message =3D new FacesMessage(FacesMessage.SEVERITY_ER= ROR, "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/component= s/richFileUpload/simple.xhtml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- modules/tests/metamer/trunk/application/src/main/webapp/components/rich= FileUpload/simple.xhtml 2011-10-18 10:00:01 UTC (rev 22819) +++ modules/tests/metamer/trunk/application/src/main/webapp/components/rich= FileUpload/simple.xhtml 2011-10-19 07:05:14 UTC (rev 22820) @@ -55,6 +55,7 @@ noDuplicate=3D"#{richFileUploadBean.attribute= s['noDuplicate'].value}" onbeforedomupdate=3D"#{richFileUploadBean.att= ributes['onbeforedomupdate'].value}" onbegin=3D"#{richFileUploadBean.attributes['o= nbegin'].value}" + onclear=3D"#{richFileUploadBean.attributes['o= nclear'].value}" = onclick=3D"#{richFileUploadBean.attributes['o= nclick'].value}" oncomplete=3D"#{richFileUploadBean.attributes= ['oncomplete'].value}" ondblclick=3D"#{richFileUploadBean.attributes= ['ondblclick'].value}" @@ -67,6 +68,7 @@ onmouseout=3D"#{richFileUploadBean.attributes= ['onmouseout'].value}" onmouseover=3D"#{richFileUploadBean.attribute= s['onmouseover'].value}" onmouseup=3D"#{richFileUploadBean.attributes[= 'onmouseup'].value}" + ontyperejected=3D"#{richFileUploadBean.attrib= utes['ontyperejected'].value}" onuploadcomplete=3D"#{richFileUploadBean.attr= ibutes['onuploadcomplete'].value}" render=3D"#{richFileUploadBean.attributes['re= nder'].value}" rendered=3D"#{richFileUploadBean.attributes['= rendered'].value}" --===============7457144647264801769==--