You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@click.apache.org by sa...@apache.org on 2009/03/28 13:05:34 UTC
svn commit: r759458 -
/incubator/click/trunk/click/framework/src/org/apache/click/util/PageImports.java
Author: sabob
Date: Sat Mar 28 12:05:34 2009
New Revision: 759458
URL: http://svn.apache.org/viewvc?rev=759458&view=rev
Log:
exposed processControl as well
Modified:
incubator/click/trunk/click/framework/src/org/apache/click/util/PageImports.java
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=759458&r1=759457&r2=759458&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 Sat Mar 28 12:05:34 2009
@@ -377,6 +377,40 @@
}
/**
+ * Process the given control HEAD elements. This method will recursively
+ * process Containers and all child controls. You can retrieve
+ * the processed HEAD elements through {@link #getHeadElements} and
+ * {@link #getJsElements()}.
+ * <p/>
+ * This method delegates to {@link #processHeadElements(java.util.List)}
+ * to add the HEAD elements to the Page imports.
+ *
+ * @param control the control to process
+ */
+ public void processControl(Control control) {
+ processHeadElements(control.getHeadElements());
+
+ if (control instanceof Container) {
+ Container container = (Container) control;
+ if (container.hasControls()) {
+ List controls = container.getControls();
+ for (int i = 0, size = controls.size(); i < size; i++) {
+ processControl((Control) controls.get(i));
+ }
+ }
+
+ } else if (control instanceof Table) {
+ Table table = (Table) control;
+ if (table.hasControls()) {
+ List controls = table.getControls();
+ for (int i = 0, size = controls.size(); i < size; i++) {
+ processControl((Control) controls.get(i));
+ }
+ }
+ }
+ }
+
+ /**
* Return the list of processed HEAD elements, excluding any JavaScript
* elements. To retrieve JavaScript elements please see
* {@link #getJsElements()}.
@@ -499,38 +533,6 @@
}
/**
- * Process the given control HEAD elements. This method will recursively
- * process Containers and all child controls.
- * <p/>
- * This method delegates to {@link #processHeadElements(java.util.List)}
- * to add the HEAD elements to the Page imports.
- *
- * @param control the control to process
- */
- protected void processControl(Control control) {
- processHeadElements(control.getHeadElements());
-
- if (control instanceof Container) {
- Container container = (Container) control;
- if (container.hasControls()) {
- List controls = container.getControls();
- for (int i = 0, size = controls.size(); i < size; i++) {
- processControl((Control) controls.get(i));
- }
- }
-
- } else if (control instanceof Table) {
- Table table = (Table) control;
- if (table.hasControls()) {
- List controls = table.getControls();
- for (int i = 0, size = controls.size(); i < size; i++) {
- processControl((Control) controls.get(i));
- }
- }
- }
- }
-
- /**
* Process the given list of HEAD elements.
* <p/>
* This method invokes {@link #add(org.apache.click.element.Element)} for