click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r783471 - in /incubator/click/trunk/click: extras/src/org/apache/click/extras/control/ framework/src/org/apache/click/element/ framework/src/org/apache/click/util/
Date Wed, 10 Jun 2009 19:44:57 GMT
Author: sabob
Date: Wed Jun 10 19:44:57 2009
New Revision: 783471

URL: http://svn.apache.org/viewvc?rev=783471&view=rev
Log:
replaced JsScript and CssStyle HtmlStringBuffer with a String as HtmlStringBuffer is not serializable

Modified:
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AutoCompleteTextField.java
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/DateField.java
    incubator/click/trunk/click/framework/src/org/apache/click/element/CssStyle.java
    incubator/click/trunk/click/framework/src/org/apache/click/element/JsScript.java
    incubator/click/trunk/click/framework/src/org/apache/click/util/PageImports.java

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AutoCompleteTextField.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AutoCompleteTextField.java?rev=783471&r1=783470&r2=783471&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AutoCompleteTextField.java
(original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/AutoCompleteTextField.java
Wed Jun 10 19:44:57 2009
@@ -306,7 +306,7 @@
             buffer.append(",'").append(contextPath).append(page.getPath()).append(
                 "'");
             buffer.append(",").append(getAutoCompleteOptions()).append(");");
-            script.setContent(buffer);
+            script.setContent(buffer.toString());
             headElements.add(script);
         }
         return headElements;

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/DateField.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/DateField.java?rev=783471&r1=783470&r2=783471&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/DateField.java
(original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/DateField.java
Wed Jun 10 19:44:57 2009
@@ -843,7 +843,7 @@
             buffer.append(" });");
             buffer.append("});");
 
-            script.setContent(buffer);
+            script.setContent(buffer.toString());
             headElements.add(script);
         }
     }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/element/CssStyle.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/element/CssStyle.java?rev=783471&r1=783470&r2=783471&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/element/CssStyle.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/element/CssStyle.java Wed Jun
10 19:44:57 2009
@@ -147,8 +147,8 @@
 
      // -------------------------------------------------------------- Variables
 
-    /** A buffer holding the inline Css content. */
-    private HtmlStringBuffer content = new HtmlStringBuffer();
+    /** The inline Css content. */
+    private String content;
 
     /**
      * Indicates if the HeadElement's content should be wrapped in a CDATA tag.
@@ -177,7 +177,7 @@
      */
     public CssStyle(String content) {
         if (content != null) {
-            this.content.append(content);
+            this.content = content;
         }
         setAttribute("type", "text/css");
         setAttribute("rel", "stylesheet");
@@ -230,20 +230,20 @@
     }
 
     /**
-     * Return the Css content buffer.
+     * Return the CssStyle content.
      *
-     * @return the Css content buffer
+     * @return the CssStyle content
      */
-    public HtmlStringBuffer getContent() {
+    public String getContent() {
         return content;
     }
 
     /**
-     * Set the Css content buffer.
+     * Set the CssStyle content.
      *
-     * @param content the new content buffer
+     * @param content the CssStyle content
      */
-    public void setContent(HtmlStringBuffer content) {
+    public void setContent(String content) {
         this.content = content;
     }
 
@@ -321,16 +321,6 @@
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Append the given Css string to the content buffer.
-     *
-     * @param content the CSS string to append to the content buffer
-     * @return the Css content buffer
-     */
-    public HtmlStringBuffer append(String content) {
-        return this.content.append(content);
-    }
-
-    /**
      * Render the HTML representation of the CssStyle element to the specified
      * buffer.
      *

Modified: incubator/click/trunk/click/framework/src/org/apache/click/element/JsScript.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/element/JsScript.java?rev=783471&r1=783470&r2=783471&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/element/JsScript.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/element/JsScript.java Wed Jun
10 19:44:57 2009
@@ -148,8 +148,8 @@
 
     // -------------------------------------------------------------- Variables
 
-    /** A buffer holding the inline JavaScript content. */
-    private HtmlStringBuffer content = new HtmlStringBuffer();
+    /** The inline JavaScript content. */
+    private String content;
 
     /**
      * Indicates if the JsScript's content should be wrapped in a CDATA tag.
@@ -184,7 +184,7 @@
      */
     public JsScript(String content) {
         if (content != null) {
-            this.content.append(content);
+            this.content = content;
         }
         setAttribute("type", "text/javascript");
     }
@@ -236,20 +236,20 @@
     }
 
     /**
-     * Return the JavaScript content buffer.
+     * Return the JsScript content.
      *
-     * @return the JavaScript content buffer
+     * @return the JsScript content
      */
-    public HtmlStringBuffer getContent() {
+    public String getContent() {
         return content;
     }
 
     /**
-     * Set the JavaScript content buffer.
+     * Set the JsScript content.
      *
-     * @param content the new content buffer
+     * @param content the JsScript content
      */
-    public void setContent(HtmlStringBuffer content) {
+    public void setContent(String content) {
         this.content = content;
     }
 
@@ -364,17 +364,6 @@
     // --------------------------------------------------------- Public Methods
 
     /**
-     * Append the given JavaScript string to the content buffer.
-     *
-     * @param content the JavaScript string to append to the content
-     * buffer
-     * @return the JavaScript content buffer
-     */
-    public HtmlStringBuffer append(String content) {
-        return this.content.append(content);
-    }
-
-    /**
      * Render the HTML representation of the JsScript element to the specified
      * buffer.
      *

Modified: incubator/click/trunk/click/framework/src/org/apache/click/util/PageImports.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/util/PageImports.java?rev=783471&r1=783470&r2=783471&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/util/PageImports.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/util/PageImports.java Wed Jun
10 19:44:57 2009
@@ -672,7 +672,7 @@
     private CssStyle asCssStyle(String line) {
         CssStyle cssStyle = new CssStyle();
         copyAttributes(cssStyle, line);
-        cssStyle.append(extractCssContent(line));
+        cssStyle.setContent(extractCssContent(line));
         return cssStyle;
     }
 
@@ -697,7 +697,7 @@
     private JsScript asJsScript(String line) {
         JsScript jsScript = new JsScript();
         copyAttributes(jsScript, line);
-        jsScript.append(extractJsContent(line, jsScript));
+        jsScript.setContent(extractJsContent(line, jsScript));
         return jsScript;
     }
 



Mime
View raw message