myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mmarinsc...@apache.org
Subject svn commit: r289860 - in /myfaces/examples/trunk/simple: WEB-INF/examples-config.xml calendar.jsp src/java/org/apache/myfaces/examples/calendarexample/CalendarBean.java src/java/org/apache/myfaces/examples/calendarexample/DateHolder.java
Date Sat, 17 Sep 2005 23:24:25 GMT
Author: mmarinschek
Date: Sat Sep 17 16:24:15 2005
New Revision: 289860

URL: http://svn.apache.org/viewcvs?rev=289860&view=rev
Log:
using org.apache.myfaces.calendar.CONVERSION for errors in the conversion process

Added:
    myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/CalendarBean.java
Modified:
    myfaces/examples/trunk/simple/WEB-INF/examples-config.xml
    myfaces/examples/trunk/simple/calendar.jsp
    myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/DateHolder.java

Modified: myfaces/examples/trunk/simple/WEB-INF/examples-config.xml
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/WEB-INF/examples-config.xml?rev=289860&r1=289859&r2=289860&view=diff
==============================================================================
--- myfaces/examples/trunk/simple/WEB-INF/examples-config.xml (original)
+++ myfaces/examples/trunk/simple/WEB-INF/examples-config.xml Sat Sep 17 16:24:15 2005
@@ -139,8 +139,8 @@
     <!-- Managed Beans for calendar.jsp -->
 
     <managed-bean>
-        <managed-bean-name>calendar</managed-bean-name>
-        <managed-bean-class>org.apache.myfaces.examples.calendarexample.DateHolder</managed-bean-class>
+        <managed-bean-name>calendarBean</managed-bean-name>
+        <managed-bean-class>org.apache.myfaces.examples.calendarexample.CalendarBean</managed-bean-class>
         <managed-bean-scope>request</managed-bean-scope>
     </managed-bean>
 

Modified: myfaces/examples/trunk/simple/calendar.jsp
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/calendar.jsp?rev=289860&r1=289859&r2=289860&view=diff
==============================================================================
Binary files - no diff available.

Added: myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/CalendarBean.java
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/CalendarBean.java?rev=289860&view=auto
==============================================================================
--- myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/CalendarBean.java
(added)
+++ myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/CalendarBean.java
Sat Sep 17 16:24:15 2005
@@ -0,0 +1,86 @@
+/**
+ * Copyright 2004 by Irian Marinschek & Spiegl Software OEG
+ */
+package org.apache.myfaces.examples.calendarexample;
+
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Date;
+import java.io.Serializable;
+
+/**
+ * @author Martin Marinschek
+ * @version $Revision: $ $Date: $
+ *          <p/>
+ *          $Log: $
+ */
+public class CalendarBean implements Serializable
+{
+    private static Log log = LogFactory.getLog(CalendarBean.class);
+
+    private List _dates;
+
+    private String _text;
+    private Date _firstDate;
+    private Date _secondDate;
+
+    public List getDates()
+    {
+        if(_dates == null)
+        {
+            _dates = new ArrayList();
+
+            for(int i=0; i<3; i++)
+                _dates.add(new DateHolder());
+        }
+
+        return _dates;
+    }
+
+    public void setDates(List dates)
+    {
+        _dates = dates;
+    }
+
+    public String getText()
+    {
+        return _text;
+    }
+
+    public void setText(String text)
+    {
+        _text = text;
+    }
+
+    public Date getFirstDate()
+    {
+        return _firstDate;
+    }
+
+    public void setFirstDate(Date firstDate)
+    {
+        _firstDate = firstDate;
+    }
+
+    public Date getSecondDate()
+    {
+        return _secondDate;
+    }
+
+    public void setSecondDate(Date secondDate)
+    {
+        _secondDate = secondDate;
+    }
+
+    public String submitMethod()
+    {
+        log.info("submit method called");
+
+        return "submit";
+    }
+
+
+}

Modified: myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/DateHolder.java
URL: http://svn.apache.org/viewcvs/myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/DateHolder.java?rev=289860&r1=289859&r2=289860&view=diff
==============================================================================
--- myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/DateHolder.java
(original)
+++ myfaces/examples/trunk/simple/src/java/org/apache/myfaces/examples/calendarexample/DateHolder.java
Sat Sep 17 16:24:15 2005
@@ -30,11 +30,7 @@
  */
 public class DateHolder implements Serializable
 {
-    private static Log log = LogFactory.getLog(DateHolder.class);
-
-    private Date _date = new Date();
-    private transient List _dates;
-    private String _text;
+    private Date _date = null;
 
     public Date getDate()
     {
@@ -44,40 +40,5 @@
     public void setDate(Date date)
     {
         _date = date;
-    }
-
-    public List getDates()
-    {
-        if(_dates == null)
-        {
-            _dates = new ArrayList();
-
-            for(int i=0; i<3; i++)
-                _dates.add(new DateHolder());
-        }
-
-        return _dates;
-    }
-
-    public void setDates(List dates)
-    {
-        _dates = dates;
-    }
-
-    public String getText()
-    {
-        return _text;
-    }
-
-    public void setText(String text)
-    {
-        _text = text;
-    }
-
-    public String submitMethod()
-    {
-        log.info("submit method called");
-
-        return "submit";
     }
 }



Mime
View raw message