click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r775737 - /incubator/click/trunk/click/extras/src/org/apache/click/extras/prototype/CalendarField.java
Date Sun, 17 May 2009 18:43:28 GMT
Author: sabob
Date: Sun May 17 18:43:28 2009
New Revision: 775737

URL: http://svn.apache.org/viewvc?rev=775737&view=rev
Log:
render Calendar markup in separate method for easier customization

Modified:
    incubator/click/trunk/click/extras/src/org/apache/click/extras/prototype/CalendarField.java

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/prototype/CalendarField.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/prototype/CalendarField.java?rev=775737&r1=775736&r2=775737&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/prototype/CalendarField.java
(original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/prototype/CalendarField.java
Sun May 17 18:43:28 2009
@@ -352,6 +352,21 @@
         }
 
         super.render(buffer);
+        renderCalendar(buffer);
+
+        if (help != null) {
+            buffer.append(help);
+        }
+    }
+
+    // ------------------------------------------------------ Protected Methods
+
+    /**
+     * Render the calendar HTML representation to the buffer.
+     *
+     * @param buffer the buffer to render the calendar HTML representation to
+     */
+    protected void renderCalendar(HtmlStringBuffer buffer) {
 
         if (!isReadonly() && !isDisabled()) {
             Context context = getContext();
@@ -373,14 +388,8 @@
             buffer.appendAttribute("title", calendarTitle);
             buffer.elementEnd();
         }
-
-        if (help != null) {
-            buffer.append(help);
-        }
     }
 
-    // ------------------------------------------------------ Protected Methods
-
     /**
      * Add the calendar options as a script to the list of head elements.
      * <p/>



Mime
View raw message