click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From med...@apache.org
Subject svn commit: r783738 - in /incubator/click/trunk/click: extras/src/org/apache/click/extras/control/ extras/src/org/apache/click/extras/panel/ extras/src/org/apache/click/extras/tree/ framework/src/org/apache/click/ framework/src/org/apache/click/control...
Date Thu, 11 Jun 2009 12:30:07 GMT
Author: medgar
Date: Thu Jun 11 12:30:06 2009
New Revision: 783738

URL: http://svn.apache.org/viewvc?rev=783738&view=rev
Log: (empty)

Added:
    incubator/click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java
      - copied, changed from r782711, incubator/click/trunk/click/framework/src/org/apache/click/ControlRegistry.java
Removed:
    incubator/click/trunk/click/framework/src/org/apache/click/ControlRegistry.java
Modified:
    incubator/click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java
    incubator/click/trunk/click/extras/src/org/apache/click/extras/panel/TabbedPanel.java
    incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java
    incubator/click/trunk/click/framework/src/org/apache/click/ActionListener.java
    incubator/click/trunk/click/framework/src/org/apache/click/ClickServlet.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractContainer.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/ActionButton.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/ActionLink.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/Field.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/FieldSet.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/Form.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/Radio.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/RadioGroup.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/Submit.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/Table.java
    incubator/click/trunk/click/framework/src/org/apache/click/control/package.html
    incubator/click/trunk/click/framework/src/org/apache/click/element/package.html
    incubator/click/trunk/click/framework/src/org/apache/click/util/Bindable.java

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/control/HtmlForm.java Thu
Jun 11 12:30:06 2009
@@ -135,7 +135,7 @@
                 }
             }
 
-            registerActionEvent();
+            dispatchActionEvent();
         }
 
         return continueProcessing;

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/panel/TabbedPanel.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/panel/TabbedPanel.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/panel/TabbedPanel.java
(original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/panel/TabbedPanel.java
Thu Jun 11 12:30:06 2009
@@ -416,7 +416,7 @@
             }
         }
         if (tabLink.isClicked()) {
-            registerActionEvent();
+            dispatchActionEvent();
         }
         return true;
     }

Modified: incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java (original)
+++ incubator/click/trunk/click/extras/src/org/apache/click/extras/tree/Tree.java Thu Jun
11 12:30:06 2009
@@ -37,7 +37,7 @@
 import org.apache.click.ActionListener;
 import org.apache.click.Context;
 import org.apache.click.Control;
-import org.apache.click.ControlRegistry;
+import org.apache.click.ActionEventDispatcher;
 import org.apache.click.control.AbstractControl;
 import org.apache.click.control.ActionLink;
 import org.apache.click.control.Decorator;
@@ -886,7 +886,7 @@
         getSelectLink().onProcess();
         bindRequestValue();
 
-        ControlRegistry.registerActionEvent(this, new ActionListener() {
+        ActionEventDispatcher.dispatchActionEvent(this, new ActionListener() {
             public boolean onAction(Control source) {
                 return postProcess();
             }

Copied: incubator/click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java
(from r782711, incubator/click/trunk/click/framework/src/org/apache/click/ControlRegistry.java)
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java?p2=incubator/click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java&p1=incubator/click/trunk/click/framework/src/org/apache/click/ControlRegistry.java&r1=782711&r2=783738&rev=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/ControlRegistry.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/ActionEventDispatcher.java
Thu Jun 11 12:30:06 2009
@@ -24,7 +24,7 @@
 import org.apache.commons.lang.Validate;
 
 /**
- * Provides a thread local register for ActionListener callbacks.
+ * Provides an control ActionListener event dispatcher.
  * <p/>
  * <b>Please note:</b> this class is meant for component development and can
be
  * ignored otherwise.
@@ -34,13 +34,13 @@
  * <tt>after</tt> the <tt>onProcess</tt> event. This event can be
specified
  * through the constant {@link #POST_ON_PROCESS_EVENT}.
  * <p/>
- * The ClickServlet will notify the ControlRegistry which ActionListeners
+ * The ClickServlet will notify the ActionEventDispatcher which ActionListeners
  * to fire. For example, after the <tt>onProcess</tt> event, the ClickServlet
- * will notify the registry to fire ActionListeners registered for the
+ * will notify the dispatcher to fire ActionListeners registered for the
  * {@link #POST_ON_PROCESS_EVENT} (this is the default event when listeners are
  * fired).
  * <p/>
- * Out of the box ControlRegistry only supports the event
+ * Out of the box ActionEventDispatcher only supports the event
  * {@link #POST_ON_PROCESS_EVENT} (the default).
  *
  * <h4>Example Usage</h4>
@@ -55,9 +55,9 @@
  *         bindRequestValue();
  *
  *         if (isClicked()) {
- *             // Register the control listener for invocation after
+ *             // Dispatch an action listener event for invocation after
  *             // control processing has finished
- *             registerActionEvent();
+ *             dispatchActionEvent();
  *         }
  *
  *         return true;
@@ -65,8 +65,8 @@
  * } </pre>
  *
  * In this example if the link is clicked, it then calls
- * {@link org.apache.click.control.AbstractControl#registerActionEvent()}.
- * This method registers the Control's action listener with ControlRegistry.
+ * {@link org.apache.click.control.AbstractControl#dispatchActionEvent()}.
+ * This method registers the Control's action listener with ActionEventDispatcher.
  * The ClickServlet will subsequently invoke the registered
  * {@link ActionListener#onAction(Control)} method after all the Page controls
  * <tt>onProcess()</tt> method have been invoked.
@@ -74,12 +74,12 @@
  * @author Bob Schellink
  * @author Malcolm Edgar
  */
-public class ControlRegistry {
+public class ActionEventDispatcher {
 
     // -------------------------------------------------------------- Constants
 
-    /** The thread local registry holder. */
-    private static final ThreadLocal THREAD_LOCAL_REGISTRY = new ThreadLocal();
+    /** The thread local dispatcher holder. */
+    private static final ThreadLocal THREAD_LOCAL_DISPATCHER = new ThreadLocal();
 
     /**
      * Indicates the listener should fire <tt>AFTER</tt> the onProcess event.
@@ -102,13 +102,13 @@
      * Listeners registered by this method will be fired in the
      * {@link #POST_ON_PROCESS_EVENT}.
      *
-     * @see #registerActionEvent(org.apache.click.Control, org.apache.click.ActionListener,
int)
+     * @see #dispatchActionEvent(org.apache.click.Control, org.apache.click.ActionListener,
int)
      *
      * @param source the action event source
      * @param listener the event action listener
      */
-    public static void registerActionEvent(Control source, ActionListener listener) {
-        registerActionEvent(source, listener, POST_ON_PROCESS_EVENT);
+    public static void dispatchActionEvent(Control source, ActionListener listener) {
+        dispatchActionEvent(source, listener, POST_ON_PROCESS_EVENT);
     }
 
     /**
@@ -119,13 +119,13 @@
      * @param listener the event action listener
      * @param event the specific event to trigger the action event
      */
-    public static void registerActionEvent(Control source,
+    public static void dispatchActionEvent(Control source,
         ActionListener listener, int event) {
 
         Validate.notNull(source, "Null source parameter");
         Validate.notNull(listener, "Null listener parameter");
 
-        ControlRegistry instance = getThreadLocalRegistry();
+        ActionEventDispatcher instance = getThreadLocalDispatcher();
         EventHolder eventHolder = instance.getEventHolder(event);
         eventHolder.registerActionEvent(source, listener);
     }
@@ -133,32 +133,32 @@
     // ------------------------------------------------------ Protected Methods
 
     /**
-     * Allow the Registry to handle the error that occurred.
+     * Allow the dispatcher to handle the error that occurred.
      *
      * @param throwable the error which occurred during processing
      */
     protected void errorOccurred(Throwable throwable) {
-        // Clear the POST_ON_PROCESS_EVENT control listeners from the registry
+        // Clear the POST_ON_PROCESS_EVENT control listeners from the dispatcher
         // Registered listeners from other phases must still be invoked
-        getEventHolder(ControlRegistry.POST_ON_PROCESS_EVENT).clear();
+        getEventHolder(ActionEventDispatcher.POST_ON_PROCESS_EVENT).clear();
     }
 
     /**
-     * Clear the registry.
+     * Clear the event list.
      */
-    protected void clearRegistry() {
+    protected void clearEvents() {
         getPostProcessEventHolder().clear();
     }
 
     /**
-     * Return the thread local registry instance.
+     * Return the thread local dispatcher instance.
      *
-     * @return the thread local registry instance.
-     * @throws RuntimeException if a ControlRegistry is not available on the
+     * @return the thread local dispatcher instance.
+     * @throws RuntimeException if a ActionEventDispatcher is not available on the
      * thread.
      */
-    protected static ControlRegistry getThreadLocalRegistry() {
-        return getRegistryStack().peek();
+    protected static ActionEventDispatcher getThreadLocalDispatcher() {
+        return getDispatcherStack().peek();
     }
 
     /**
@@ -211,7 +211,7 @@
      * @return true if the page should continue processing or false otherwise
      */
     protected boolean fireActionEvents(Context context) {
-        return fireActionEvents(context, ControlRegistry.POST_ON_PROCESS_EVENT);
+        return fireActionEvents(context, ActionEventDispatcher.POST_ON_PROCESS_EVENT);
     }
 
     /**
@@ -290,29 +290,29 @@
     }
 
     /**
-     * Adds the specified ControlRegistry on top of the Registry stack.
+     * Adds the specified ActionEventDispatcher on top of the dispatcher stack.
      *
-     * @param controlRegistry the ControlRegistry to add
+     * @param actionEventDispatcher the ActionEventDispatcher to add
      */
-    static void pushThreadLocalRegistry(ControlRegistry controlRegistry) {
-        getRegistryStack().push(controlRegistry);
+    static void pushThreadLocalDispatcher(ActionEventDispatcher actionEventDispatcher) {
+        getDispatcherStack().push(actionEventDispatcher);
     }
 
     /**
-     * Remove and return the controlRegistry instance on top of the
-     * registry stack.
+     * Remove and return the actionEventDispatcher instance on top of the
+     * dispatcher stack.
      *
-     * @return the controlRegistry instance on top of the registry stack
+     * @return the actionEventDispatcher instance on top of the dispatcher stack
      */
-    static ControlRegistry popThreadLocalRegistry() {
-        RegistryStack registryStack = getRegistryStack();
-        ControlRegistry controlRegistry = registryStack.pop();
+    static ActionEventDispatcher popThreadLocalDispatcher() {
+        DispatcherStack dispatcherStack = getDispatcherStack();
+        ActionEventDispatcher actionEventDispatcher = dispatcherStack.pop();
 
-        if (registryStack.isEmpty()) {
-            THREAD_LOCAL_REGISTRY.set(null);
+        if (dispatcherStack.isEmpty()) {
+            THREAD_LOCAL_DISPATCHER.set(null);
         }
 
-        return controlRegistry;
+        return actionEventDispatcher;
     }
 
     /**
@@ -320,15 +320,15 @@
      *
      * @return stack data structure where Context's are stored
      */
-    static RegistryStack getRegistryStack() {
-        RegistryStack registryStack = (RegistryStack) THREAD_LOCAL_REGISTRY.get();
+    static DispatcherStack getDispatcherStack() {
+        DispatcherStack dispatcherStack = (DispatcherStack) THREAD_LOCAL_DISPATCHER.get();
 
-        if (registryStack == null) {
-            registryStack = new RegistryStack(2);
-            THREAD_LOCAL_REGISTRY.set(registryStack);
+        if (dispatcherStack == null) {
+            dispatcherStack = new DispatcherStack(2);
+            THREAD_LOCAL_DISPATCHER.set(dispatcherStack);
         }
 
-        return registryStack;
+        return dispatcherStack;
     }
 
     // ---------------------------------------------------------- Inner Classes
@@ -376,7 +376,7 @@
         /**
          * Checks if any Action Events have been registered.
          *
-         * @return true if the registry has any Action Events registered
+         * @return true if the dispatcher has any Action Events registered
          */
         public boolean hasActionEvents() {
             if (eventListenerList == null || eventListenerList.isEmpty()) {
@@ -432,7 +432,7 @@
                 return true;
             }
 
-            return ControlRegistry.this.fireActionEvents(context,
+            return ActionEventDispatcher.this.fireActionEvents(context,
                 getEventSourceList(), getEventListenerList(), event);
         }
     }
@@ -440,60 +440,60 @@
     /**
      * Provides an unsynchronized Stack.
      */
-    static class RegistryStack extends ArrayList {
+    static class DispatcherStack extends ArrayList {
 
         /** Serialization version indicator. */
         private static final long serialVersionUID = 1L;
 
         /**
-         * Create a new RegistryStack with the given initial capacity.
+         * Create a new DispatcherStack with the given initial capacity.
          *
          * @param initialCapacity specify initial capacity of this stack
          */
-        private RegistryStack(int initialCapacity) {
+        private DispatcherStack(int initialCapacity) {
             super(initialCapacity);
         }
 
         /**
-         * Pushes the ControlRegistry onto the top of this stack.
+         * Pushes the ActionEventDispatcher onto the top of this stack.
          *
-         * @param controlRegistry the ControlRegistry to push onto this stack
-         * @return the ControlRegistry pushed on this stack
+         * @param actionEventDispatcher the ActionEventDispatcher to push onto this stack
+         * @return the ActionEventDispatcher pushed on this stack
          */
-        private ControlRegistry push(ControlRegistry controlRegistry) {
-            add(controlRegistry);
+        private ActionEventDispatcher push(ActionEventDispatcher actionEventDispatcher) {
+            add(actionEventDispatcher);
 
-            return controlRegistry;
+            return actionEventDispatcher;
         }
 
         /**
-         * Removes and return the ControlRegistry at the top of this stack.
+         * Removes and return the ActionEventDispatcher at the top of this stack.
          *
-         * @return the ControlRegistry at the top of this stack
+         * @return the ActionEventDispatcher at the top of this stack
          */
-        private ControlRegistry pop() {
-            ControlRegistry controlRegistry = peek();
+        private ActionEventDispatcher pop() {
+            ActionEventDispatcher actionEventDispatcher = peek();
 
             remove(size() - 1);
 
-            return controlRegistry;
+            return actionEventDispatcher;
         }
 
         /**
-         * Looks at the ControlRegistry at the top of this stack without
+         * Looks at the ActionEventDispatcher at the top of this stack without
          * removing it.
          *
-         * @return the ControlRegistry at the top of this stack
+         * @return the ActionEventDispatcher at the top of this stack
          */
-        private ControlRegistry peek() {
+        private ActionEventDispatcher peek() {
             int length = size();
 
             if (length == 0) {
-                String msg = "No ControlRegistry available on ThreadLocal Registry Stack";
+                String msg = "No ActionEventDispatcher available on ThreadLocal Dispatcher
Stack";
                 throw new RuntimeException(msg);
             }
 
-            return (ControlRegistry) get(length - 1);
+            return (ActionEventDispatcher) get(length - 1);
         }
     }
 }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/ActionListener.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/ActionListener.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/ActionListener.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/ActionListener.java Thu Jun
11 12:30:06 2009
@@ -19,7 +19,7 @@
 package org.apache.click;
 
 /**
- * Provides a listener interface for receiving Control action events.
+ * Provides a listener interface for receiving control action events.
  * The usage model is similar to the <tt>java.awt.event.ActionListener</tt>
  * interface.
  * <p/>

Modified: incubator/click/trunk/click/framework/src/org/apache/click/ClickServlet.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/ClickServlet.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/ClickServlet.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/ClickServlet.java Thu Jun 11
12:30:06 2009
@@ -320,9 +320,9 @@
                 throw exception;
             }
 
-            ControlRegistry controlRegistry = createControlRegistry();
-            // Bind ControlRegistry to current thread
-            ControlRegistry.pushThreadLocalRegistry(controlRegistry);
+            ActionEventDispatcher eventDispatcher = createActionEventDispatcher();
+            // Bind ActionEventDispatcher to current thread
+            ActionEventDispatcher.pushThreadLocalDispatcher(eventDispatcher);
 
             page = createPage(request);
 
@@ -372,7 +372,7 @@
                 if (request.getAttribute(MOCK_MODE_ENABLED) == null) {
                     Context.popThreadLocalContext();
                 }
-                ControlRegistry.popThreadLocalRegistry();
+                ActionEventDispatcher.popThreadLocalDispatcher();
             }
         }
     }
@@ -489,15 +489,15 @@
         PageImports pageImports = createPageImports(page);
         page.setPageImports(pageImports);
 
-        ControlRegistry controlRegistry = ControlRegistry.getThreadLocalRegistry();
+        ActionEventDispatcher eventDispatcher = ActionEventDispatcher.getThreadLocalDispatcher();
 
         // Support direct access of click-error.htm
         if (page instanceof ErrorPage) {
             ErrorPage errorPage = (ErrorPage) page;
             errorPage.setMode(configService.getApplicationMode());
 
-            // Notify the registry of the error
-            controlRegistry.errorOccurred(errorPage.getError());
+            // Notify the dispatcher of the error
+            eventDispatcher.errorOccurred(errorPage.getError());
         }
 
         boolean continueProcessing = performOnSecurityCheck(page, context);
@@ -505,7 +505,7 @@
         if (continueProcessing) {
             performOnInit(page, context);
 
-            continueProcessing = performOnProcess(page, context, controlRegistry);
+            continueProcessing = performOnProcess(page, context, eventDispatcher);
 
             if (continueProcessing) {
                 performOnPostOrGet(page, context, isPost);
@@ -575,11 +575,11 @@
      *
      * @param page the page to process
      * @param context the request context
-     * @param controlRegistry the control registry
+     * @param eventDispatcher the action event dispatcher
      * @return true if processing should continue, false otherwise
      */
     protected boolean performOnProcess(Page page, Context context,
-        ControlRegistry controlRegistry) {
+        ActionEventDispatcher eventDispatcher) {
 
         boolean continueProcessing = true;
 
@@ -609,7 +609,7 @@
             if (continueProcessing) {
                 // Fire registered action events for the POST_ON_PROCSESS event,
                 // which is also the default event
-                continueProcessing = controlRegistry.fireActionEvents(context);
+                continueProcessing = eventDispatcher.fireActionEvents(context);
 
                 if (logger.isTraceEnabled()) {
                     String msg = "   invoked: Control listeners : "
@@ -1446,12 +1446,12 @@
     }
 
     /**
-     * Creates and returns a new ControlRegistry instance.
+     * Creates and returns a new ActionEventDispatcher instance.
      *
-     * @return the new ControlRegistry instance
+     * @return the new ActionEventDispatcher instance
      */
-    protected ControlRegistry createControlRegistry() {
-        return new ControlRegistry();
+    protected ActionEventDispatcher createActionEventDispatcher() {
+        return new ActionEventDispatcher();
     }
 
     /**

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractContainer.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractContainer.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractContainer.java
(original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractContainer.java
Thu Jun 11 12:30:06 2009
@@ -228,7 +228,7 @@
             }
         }
 
-        registerActionEvent();
+        dispatchActionEvent();
 
         return continueProcessing;
     }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java
(original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/AbstractControl.java
Thu Jun 11 12:30:06 2009
@@ -35,7 +35,7 @@
 import org.apache.click.ActionListener;
 import org.apache.click.Context;
 import org.apache.click.Control;
-import org.apache.click.ControlRegistry;
+import org.apache.click.ActionEventDispatcher;
 import org.apache.click.Page;
 import org.apache.click.util.ActionListenerAdaptor;
 import org.apache.click.util.ClickUtils;
@@ -84,7 +84,7 @@
  * By overriding {@link #getTag()} one can specify the html tag to render.
  * <p/>
  * Overriding {@link #onProcess()} allows one to bind the servlet request
- * parameter to MyField value. The {@link #registerActionEvent()} method
+ * parameter to MyField value. The {@link #dispatchActionEvent()} method
  * registers the listener for this control on the Context. Once the onProcess
  * event has finished, all registered listeners will be fired.
  * <p/>
@@ -477,7 +477,7 @@
     * @return true to continue Page event processing or false otherwise
     */
     public boolean onProcess() {
-        registerActionEvent();
+        dispatchActionEvent();
         return true;
     }
 
@@ -837,14 +837,13 @@
     // ------------------------------------------------------ Protected Methods
 
     /**
-     * Register this control's listener with the {@link org.apache.click.ControlRegistry}
-     * registry.
+     * Dispatch an ActionListener event with the {@link org.apache.click.ActionEventDispatcher}.
      *
-     * @see org.apache.click.ControlRegistry#registerActionEvent(org.apache.click.Control,
org.apache.click.ActionListener)
+     * @see org.apache.click.ActionEventDispatcher#dispatchActionEvent(org.apache.click.Control,
org.apache.click.ActionListener)
      */
-    protected void registerActionEvent() {
+    protected void dispatchActionEvent() {
         if (getActionListener() != null) {
-            ControlRegistry.registerActionEvent(this, getActionListener());
+            ActionEventDispatcher.dispatchActionEvent(this, getActionListener());
         }
     }
 

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/ActionButton.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/ActionButton.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/ActionButton.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/ActionButton.java Thu
Jun 11 12:30:06 2009
@@ -493,7 +493,7 @@
         bindRequestValue();
 
         if (isClicked()) {
-            registerActionEvent();
+            dispatchActionEvent();
         }
         return true;
     }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/ActionLink.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/ActionLink.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/ActionLink.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/ActionLink.java Thu
Jun 11 12:30:06 2009
@@ -507,7 +507,7 @@
         bindRequestValue();
 
         if (isClicked()) {
-            registerActionEvent();
+            dispatchActionEvent();
         }
         return true;
     }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/Field.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/Field.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/Field.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/Field.java Thu Jun
11 12:30:06 2009
@@ -74,7 +74,7 @@
  * value is not valid this method should set the Field {@link #error} property,
  * which can be rendered by the Form.
  * </dd>
- * <dt>{@link #registerActionEvent()}</dt>
+ * <dt>{@link #dispatchActionEvent()}</dt>
  * <dd>This method will register any Control action listener method which has be
  * defined for the Field.
  * </dd>
@@ -901,7 +901,7 @@
             validate();
         }
 
-        registerActionEvent();
+        dispatchActionEvent();
 
         return true;
     }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/FieldSet.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/FieldSet.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/FieldSet.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/FieldSet.java Thu Jun
11 12:30:06 2009
@@ -758,7 +758,7 @@
                 }
             }
         }
-        registerActionEvent();
+        dispatchActionEvent();
         return true;
     }
 

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=783738&r1=783737&r2=783738&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 Thu Jun 11
12:30:06 2009
@@ -1756,7 +1756,7 @@
                 }
             }
 
-            registerActionEvent();
+            dispatchActionEvent();
         }
 
         return continueProcessing;

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/Radio.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/Radio.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/Radio.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/Radio.java Thu Jun
11 12:30:06 2009
@@ -316,7 +316,7 @@
         bindRequestValue();
 
         if (isChecked()) {
-            registerActionEvent();
+            dispatchActionEvent();
         }
         return true;
     }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/RadioGroup.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/RadioGroup.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/RadioGroup.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/RadioGroup.java Thu
Jun 11 12:30:06 2009
@@ -436,7 +436,7 @@
             validate();
         }
 
-        registerActionEvent();
+        dispatchActionEvent();
 
         return continueProcessing;
     }

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/Submit.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/Submit.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/Submit.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/Submit.java Thu Jun
11 12:30:06 2009
@@ -205,7 +205,7 @@
         bindRequestValue();
 
         if (isClicked()) {
-            registerActionEvent();
+            dispatchActionEvent();
         }
 
         return true;

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=783738&r1=783737&r2=783738&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 Thu Jun
11 12:30:06 2009
@@ -1231,7 +1231,7 @@
             }
         }
 
-        registerActionEvent();
+        dispatchActionEvent();
         return continueProcessing;
     }
 

Modified: incubator/click/trunk/click/framework/src/org/apache/click/control/package.html
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/control/package.html?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/control/package.html (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/control/package.html Thu Jun
11 12:30:06 2009
@@ -42,13 +42,13 @@
 Examples of these two action listener styles are provided below:
 
 <pre class="prettyprint">
-public class ActionDemo extends BorderPage {
+public class ActionDemo extends Page {
 
     // Uses listener style 1
-    public ActionLink link = new ActionLink();
+    @Bindable public ActionLink link = new ActionLink();
 
     // Uses listener style 2
-    public ActionButton button = new ActionButton();
+    @Bindable public ActionButton button = new ActionButton();
 
     public ActionDemo() {
 

Modified: incubator/click/trunk/click/framework/src/org/apache/click/element/package.html
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/element/package.html?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/element/package.html (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/element/package.html Thu Jun
11 12:30:06 2009
@@ -18,7 +18,9 @@
 -->
 
 <body>
-Provides basic HTML elements including:
+Provides HTML elements for page CSS and JavaScript support.
+<p/>
+Core HTML elements include:
 <ul>
     <li>{@link org.apache.click.element.JsImport JsImport} - for importing external
JavaScript files</li>
     <li>{@link org.apache.click.element.JsScript JsScript} - for embedding JavaScript
content in the page</li>

Modified: incubator/click/trunk/click/framework/src/org/apache/click/util/Bindable.java
URL: http://svn.apache.org/viewvc/incubator/click/trunk/click/framework/src/org/apache/click/util/Bindable.java?rev=783738&r1=783737&r2=783738&view=diff
==============================================================================
--- incubator/click/trunk/click/framework/src/org/apache/click/util/Bindable.java (original)
+++ incubator/click/trunk/click/framework/src/org/apache/click/util/Bindable.java Thu Jun
11 12:30:06 2009
@@ -26,6 +26,32 @@
 /**
  * Provides a Page field auto binding annotation.
  *
+ * <h3>Bindable Example</h3>
+ *
+ * <pre class="prettyprint">
+ * public class BindableDemo extends Page {
+ *
+ *     // ActionLink automatically added to Page control list
+ *     &#64;Bindable public ActionLink link = new ActionLink();
+ *
+ *     // Message string is automatically added to Page model
+ *     &#64;Bindable public String message;
+ *
+ *     public BindableDemo() {
+ *
+ *         // Listener method invoked when link clicked
+ *         link.setActionListener(new ActionListener() {
+ *
+ *             public boolean onAction(Control source) {
+ *                 // message added to page mode and rendered in template
+ *                 message = "I was clicked";
+ *                 return true;
+ *             }
+ *         });
+ *     }
+ *
+ * } </pre>
+ *
  * @author Malcolm Edgar
  */
 @Target(ElementType.FIELD)



Mime
View raw message