click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r786812 - in /incubator/click/trunk/click/framework/src: ./ META-INF/ META-INF/web/ META-INF/web/click/ org/apache/click/ org/apache/click/control/ org/apache/click/service/ org/apache/click/util/
Date Sat, 20 Jun 2009 13:24:49 GMT
Author: sabob
Date: Sat Jun 20 13:24:48 2009
New Revision: 786812

URL: http://svn.apache.org/viewvc?rev=786812&view=rev
Log:
moved resources to META-INF/web. removed onDeploy methods

Added:
    incubator/click/trunk/click/framework/src/META-INF/
    incubator/click/trunk/click/framework/src/META-INF/web/
    incubator/click/trunk/click/framework/src/META-INF/web/click/
    incubator/click/trunk/click/framework/src/META-INF/web/click/VM_global_library.vm
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/VM_global_library.vm
    incubator/click/trunk/click/framework/src/META-INF/web/click/column-ascending-dark.gif
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/column-ascending-dark.gif
    incubator/click/trunk/click/framework/src/META-INF/web/click/column-ascending-light.gif
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/column-ascending-light.gif
    incubator/click/trunk/click/framework/src/META-INF/web/click/column-descending-dark.gif
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/column-descending-dark.gif
    incubator/click/trunk/click/framework/src/META-INF/web/click/column-descending-light.gif
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/column-descending-light.gif
    incubator/click/trunk/click/framework/src/META-INF/web/click/column-sortable-dark.gif
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/column-sortable-dark.gif
    incubator/click/trunk/click/framework/src/META-INF/web/click/column-sortable-light.gif
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/column-sortable-light.gif
    incubator/click/trunk/click/framework/src/META-INF/web/click/control.css
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/control.css
    incubator/click/trunk/click/framework/src/META-INF/web/click/control.js
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/control.js
    incubator/click/trunk/click/framework/src/META-INF/web/click/error.htm
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/util/error.htm
    incubator/click/trunk/click/framework/src/META-INF/web/click/not-found.htm
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/not-found.htm
    incubator/click/trunk/click/framework/src/META-INF/web/click/table.css
      - copied unchanged from r783889, incubator/click/trunk/click/framework/src/org/apache/click/control/table.css
Removed:
    incubator/click/trunk/click/framework/src/org/apache/click/control/VM_global_library.vm
    incubator/click/trunk/click/framework/src/org/apache/click/control/column-ascending-dark.gif
    incubator/click/trunk/click/framework/src/org/apache/click/control/column-ascending-light.gif
    incubator/click/trunk/click/framework/src/org/apache/click/control/column-descending-dark.gif
    incubator/click/trunk/click/framework/src/org/apache/click/control/column-descending-light.gif
    incubator/click/trunk/click/framework/src/org/apache/click/control/column-sortable-dark.gif
    incubator/click/trunk/click/framework/src/org/apache/click/control/column-sortable-light.gif
    incubator/click/trunk/click/framework/src/org/apache/click/control/control.css
    incubator/click/trunk/click/framework/src/org/apache/click/control/control.js
    incubator/click/trunk/click/framework/src/org/apache/click/control/image-submit.gif
    incubator/click/trunk/click/framework/src/org/apache/click/control/table.css
    incubator/click/trunk/click/framework/src/org/apache/click/not-found.htm
    incubator/click/trunk/click/framework/src/org/apache/click/util/error.htm
Modified:
    incubator/click/trunk/click/framework/src/click-controls.xml
    incubator/click/trunk/click/framework/src/org/apache/click/control/Form.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java
    incubator/click/trunk/click/framework/src/org/apache/click/service/XmlConfigService.java

Modified: incubator/click/trunk/click/framework/src/click-controls.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/click-controls.xml?rev=786812&r1=786811&r2=786812&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/click-controls.xml (original)
+++ incubator/click/trunk/click/framework/src/click-controls.xml Sat Jun 20 13:24:48 2009
@@ -20,7 +20,6 @@
 <click-app>
 
   <controls>
-    <control classname="org.apache.click.control.Table"/>
   </controls>
 
 </click-app>
\ No newline at end of file

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/Form.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/Form.java?rev=786812&r1=786811&r2=786812&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/Form.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/Form.java Sat Jun 20
13:24:48 2009
@@ -211,25 +211,33 @@
  * prevents JavaScript form validation being performed when the cancel button is
  * clicked.
  *
- * <h3>CSS and JavaScript Imports</h3>
+ * <a name="resources"></a>
+ * <h3>CSS and JavaScript resources</h3>
+ *
+ * The Form control makes use of the following resources (which Click automatically
+ * deploys to the application directory, <tt>/click</tt>):
+ *
+ * <ul>
+ * <li><tt>click/control.css</tt></li>
+ * <li><tt>click/control.js</tt></li>
+ * </ul>
  *
- * The Form control automatically deploys the control CSS style sheet
- * (<tt>control.css</tt>) and JavaScript file (<tt>control.js</tt>)
to
- * the application directory <tt>/click</tt>.
  * To import these files and any form control imports simply reference
- * <span class="blue">$cssImports</span> and <span class="blue">$jsImports</span>
- * in the page template. For example:
+ * the variables <span class="blue">$headElements</span> and
+ * <span class="blue">$jsElements</span> in the page template. For example:
  *
  * <pre class="codeHtml">
  * &lt;html&gt;
  * &lt;head&gt;
- * <span class="blue">$cssImports</span>
+ * <span class="blue">$headElements</span>
  * &lt;/head&gt;
  * &lt;body&gt;
+ *
  * <span class="red">$form</span>
+ *
+ * <span class="blue">$jsElements</span>
  * &lt;/body&gt;
- * &lt;/html&gt;
- * <span class="blue">$jsImports</span></pre>
+ * &lt;/html&gt; </pre>
  *
  * <a name="form-layout"></a>
  * <h3>Form Layout</h3>
@@ -1073,9 +1081,15 @@
     }
 
     /**
-     * Return the HTML head import statements for the CSS stylesheet
-     * (<tt>click/control.css</tt>) and JavaScript
-     * (<tt>click/control.js</tt>) files.
+     * Return the Form HTML head imports statements for the following resources:
+     * <p/>
+     * <ul>
+     * <li><tt>click/control.css</tt></li>
+     * <li><tt>click/control.js</tt></li>
+     * </ul>
+     * <p/>
+     * Additionally all {@link #getControls() controls} import statements are
+     * also returned.
      *
      * @see org.apache.click.Control#getHtmlImports()
      *

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java?rev=786812&r1=786811&r2=786812&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java Sat Jun
20 13:24:48 2009
@@ -27,8 +27,6 @@
 import java.util.Set;
 import java.util.StringTokenizer;
 
-import javax.servlet.ServletContext;
-
 import org.apache.click.Control;
 import org.apache.click.util.ClickUtils;
 import org.apache.click.util.HtmlStringBuffer;
@@ -95,26 +93,39 @@
  *     }
  * } </pre>
  *
- * <h4>Table Styles</h4>
+ * <a name="resources"></a>
+ * <h3>CSS and JavaScript resources</h3>
+ *
+ * The Table control makes use of the following resources (which Click automatically
+ * deploys to the application directory, <tt>/click</tt>):
  *
- * The Table control automatically deploys the table CSS style sheet
- * (<tt>table.css</tt>) to the application directory <tt>/click</tt>.
- * To import the Table CSS styles and any control JavaScript simply reference <span class="blue">$cssImports</span>
- * and <span class="blue">$jsImports</span> in the page template. For example:
+ * <ul>
+ * <li><tt>click/table.css</tt></li>
+ * </ul>
+ *
+ * To import the Table CSS styles and any control JavaScript simply reference
+ * the variables <span class="blue">$headElements</span> and
+ * <span class="blue">$jsElements</span> in the page template. For example:
  *
  * <pre class="codeHtml">
  * &lt;html&gt;
  * &lt;head&gt;
- * <span class="blue">$cssImports</span>
+ * <span class="blue">$headElements</span>
  * &lt;/head&gt;
  * &lt;body&gt;
+ *
  * <span class="red">$table</span>
+ *
+ * <span class="blue">$jsElements</span>
  * &lt;/body&gt;
- * &lt;/html&gt;
- * <span class="blue">$jsImports</span></pre>
+ * &lt;/html&gt; </pre>
+ *
+ * <a name="styles"></a>
+ * <h4>Table Styles</h4>
  *
  * The table CSS style sheet is adapted from the DisplayTag <tt>screen.css</tt>
  * style sheet and includes the styles:
+ *
  * <ul style="margin-top:0.5em;">
  *  <li>blue1</li>
  *  <li>blue2</li>
@@ -780,8 +791,14 @@
     }
 
     /**
-     * Return the HTML head import statements for the CSS stylesheet file:
-     * <tt>click/table.css</tt>.
+     * Return the Table HTML head import statements for the following resources:
+     * <p/>
+     * <ul>
+     * <li><tt>click/table.css</tt></li>
+     * </ul>
+     * <p/>
+     * Additionally all {@link #getControls() controls} import statements are
+     * also returned.
      *
      * @return the HTML head import statements for the control stylesheet
      */
@@ -1152,32 +1169,6 @@
     }
 
     /**
-     * Deploy the <tt>table.css</tt> and column sorting icon files to the
-     * <tt>click</tt> web directory when the application is initialized.
-     *
-     * @see Control#onDeploy(ServletContext)
-     *
-     * @param servletContext the servlet context
-     */
-    public void onDeploy(ServletContext servletContext) {
-        String[] files = new String[] {
-                "/org/apache/click/control/column-sortable-dark.gif",
-                "/org/apache/click/control/column-sortable-light.gif",
-                "/org/apache/click/control/column-ascending-dark.gif",
-                "/org/apache/click/control/column-ascending-light.gif",
-                "/org/apache/click/control/column-descending-dark.gif",
-                "/org/apache/click/control/column-descending-light.gif",
-                "/org/apache/click/control/table.css"
-            };
-
-        for (int i = 0; i < files.length; i++) {
-            ClickUtils.deployFile(servletContext,
-                                  files[i],
-                                  "click");
-        }
-    }
-
-    /**
      * Initialize the controls contained in the Table.
      *
      * @see org.apache.click.Control#onInit()

Modified: incubator/click/trunk/click/framework/src/org/apache/click/service/XmlConfigService.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/service/XmlConfigService.java?rev=786812&r1=786811&r2=786812&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/service/XmlConfigService.java
(original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/service/XmlConfigService.java
Sat Jun 20 13:24:48 2009
@@ -1118,16 +1118,6 @@
         boolean resourcesDeployable = (servletContext.getRealPath("/") != null);
 
         if (resourcesDeployable) {
-            String[] resources = {
-                "/org/apache/click/control/control.css",
-                "/org/apache/click/control/control.js",
-                "/org/apache/click/util/error.htm",
-                "/org/apache/click/not-found.htm",
-                "/org/apache/click/control/VM_global_library.vm"
-            };
-
-            ClickUtils.deployFiles(servletContext, resources, "click");
-
             deployControls(getResourceRootElement("/click-controls.xml"));
             deployControls(getResourceRootElement("/extras-controls.xml"));
             deployControls(rootElm);



Mime
View raw message