Author: craigmcc
Date: Sat Jan 14 17:27:25 2006
New Revision: 369152

URL: http://svn.apache.org/viewcvs?rev=369152&view=rev
Log:
Second stage of refactoring for issue [38185].  Callbacks for a ViewController 
are
now delegated to an instance of ViewControllerCallbacks.  The standard 
implementation
of this class simply casts to ViewController and calls through (functionally 
equivalent
to the previous behavior).  However, this enables the Shale Tiger Extensions 
version
of ViewControllerCallbacks to support calling arbitrary methods identified via 
an
annotation.

Added:
    
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/CallbacksFactory.java
    
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewControllerCallbacks.java
    struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/
    
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/CallbacksFactoryTestCase.java
    
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/TestViewController.java
    
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/ViewControllerCallbacksTestCase.java
Modified:
    
struts/shale/trunk/core-library/src/java/org/apache/shale/view/Constants.java
    
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewPhaseListener.java
    
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewViewHandler.java

Modified: 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/Constants.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/view/Constants.java?rev=369152&r1=369151&r2=369152&view=diff
==============================================================================
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/Constants.java 
(original)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/Constants.java 
Sat Jan 14 17:27:25 2006
@@ -16,6 +16,7 @@
 
 package org.apache.shale.view;
 
+
 /**
  * <p>Manifest constants related to Shale view support.</p>
  */
@@ -36,12 +37,29 @@
 
     /**
      * <p>Application scope attribute under which the
+     * <code>ViewControllerCallbacks</code> instance for this application
+     * is stored.</p>
+     */
+    public static final String VIEW_CALLBACKS =
+      "org.apache.shale.view.VIEW_CALLBACKS";
+
+
+    /**
+     * <p>Application scope attribute under which the
      * [EMAIL PROTECTED] ViewControllerMapper} for translating view identifiers
      * to class names of the corresponding [EMAIL PROTECTED] ViewController}
      * is stored.</p>
      */
     public static final String VIEW_MAPPER =
       "org.apache.shale.view.VIEW_MAPPER";
+
+
+    /**
+     * <p>Request scope attribute under which a <code>Boolean.TRUE</code>
+     * flag is stored if this request is a postback.</p>
+     */
+    public static final String VIEW_POSTBACK =
+      "org.apache.shale.view.VIEW_POSTBACK";
 
 
     /**

Added: 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/CallbacksFactory.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/CallbacksFactory.java?rev=369152&view=auto
==============================================================================
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/CallbacksFactory.java
 (added)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/CallbacksFactory.java
 Sat Jan 14 17:27:25 2006
@@ -0,0 +1,102 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shale.view.faces;
+
+import javax.faces.FacesException;
+
+/**
+ * <p>Factory for callback handler instances.</p>
+ *
+ * $Id$
+ *
+ * @since 1.0.1
+ */
+public class CallbacksFactory {
+    
+
+    // ------------------------------------------------------------ 
Constructors
+
+
+    /**
+     * <p>Private constructor to prevent arbitrary object creation.</p>
+     */
+    public CallbacksFactory() {
+    }
+
+
+    // ---------------------------------------------------------- Static 
Methods
+
+
+    /**
+     * <p>Return a suitable instance of this factory.</p.
+     */
+    public static CallbacksFactory getInstance() {
+        return new CallbacksFactory();
+    }
+
+
+    // ---------------------------------------------------------- Public 
Methods
+
+
+    /**
+     * <p>Return a suitable implementation of [EMAIL PROTECTED] 
ViewControllerCallbacks}.</p>
+     */
+    public ViewControllerCallbacks getViewControllerCallbacks() {
+
+        ClassLoader cl = getApplicationClassLoader();
+        Class clazz = null;
+        try {
+            clazz = 
cl.loadClass("org.apache.shale.tiger.view.faces.ViewControllerCallbacks");
+        } catch (ClassNotFoundException e) {
+            ;
+        }
+        if (clazz == null) {
+            try {
+                clazz = 
cl.loadClass("org.apache.shale.view.faces.ViewControllerCallbacks");
+            } catch (ClassNotFoundException e) {
+                throw new FacesException(e);
+            }
+        }
+
+        try {
+            return (ViewControllerCallbacks) clazz.newInstance();
+        } catch (Exception e) {
+            throw new FacesException(e);
+        }
+
+    }
+
+
+
+    // --------------------------------------------------------- Private 
Methods
+
+
+    /**
+     * <p>Return the class loader to use for loading application classes.</p>
+     */
+    private ClassLoader getApplicationClassLoader() {
+
+        ClassLoader cl = Thread.currentThread().getContextClassLoader();
+        if (cl == null) {
+            cl = this.getClass().getClassLoader();
+        }
+        return cl;
+
+    }
+
+
+}

Added: 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewControllerCallbacks.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewControllerCallbacks.java?rev=369152&view=auto
==============================================================================
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewControllerCallbacks.java
 (added)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewControllerCallbacks.java
 Sat Jan 14 17:27:25 2006
@@ -0,0 +1,103 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shale.view.faces;
+
+import org.apache.shale.view.ViewController;
+
+/**
+ * <p>Utility class to perform the event callbacks specified by the
+ * [EMAIL PROTECTED] ViewController} interface.  The method signatures make it
+ * possible to specialize the behavior for annotated callbacks in the
+ * <em>Shale Tiger Extensions</em> module.</p>
+ *
+ * @since 1.0.1
+ *
+ * $Id: ViewPhaseListener.java 367148 2006-01-09 01:01:56Z craigmcc $
+ */
+public class ViewControllerCallbacks {
+    
+
+    // ------------------------------------------------------------ 
Constructors
+
+
+    // ------------------------------------------------------ Instance 
Variables
+
+
+    // ---------------------------------------------------------- Public 
Methods
+
+
+    /**
+     * <p>Perform the <code>init</code> callback on the specified
+     * instance.</p>
+     *
+     * @param instance Bean instance on which to perform this callback
+     */
+    public void init(Object instance) {
+
+        if (instance instanceof ViewController) {
+            ((ViewController) instance).init();
+        }
+
+    }
+
+
+    /**
+     * <p>Perform the <code>preprocess</code> callback on the specified
+     * instance.</p>
+     *
+     * @param instance Bean instance on which to perform this callback
+     */
+    public void preprocess(Object instance) {
+
+        if (instance instanceof ViewController) {
+            ((ViewController) instance).preprocess();
+        }
+
+    }
+
+
+    /**
+     * <p>Perform the <code>prerender</code> callback on the specified
+     * instance.</p>
+     *
+     * @param instance Bean instance on which to perform this callback
+     */
+    public void prerender(Object instance) {
+
+        if (instance instanceof ViewController) {
+            ((ViewController) instance).prerender();
+        }
+
+    }
+
+
+    /**
+     * <p>Perform the <code>destroy</code> callback on the specified
+     * instance.</p>
+     *
+     * @param instance Bean instance on which to perform this callback
+     */
+    public void destroy(Object instance) {
+
+        if (instance instanceof ViewController) {
+            ((ViewController) instance).destroy();
+        }
+
+    }
+
+
+}

Modified: 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewPhaseListener.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewPhaseListener.java?rev=369152&r1=369151&r2=369152&view=diff
==============================================================================
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewPhaseListener.java
 (original)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewPhaseListener.java
 Sat Jan 14 17:27:25 2006
@@ -1,5 +1,5 @@
 /*
- * Copyright 2004-2006 The Apache Software Foundation.
+ * Copyright 2006 The Apache Software Foundation.
  * 
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -19,6 +19,7 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import javax.faces.context.FacesContext;
 
 import javax.faces.event.PhaseEvent;
 import javax.faces.event.PhaseId;
@@ -133,8 +134,8 @@
         }
         Iterator vcs = list.iterator();
         while (vcs.hasNext()) {
-            ViewController vc = (ViewController) vcs.next();
-            vc.destroy();
+            Object vc = vcs.next();
+            viewControllerCallbacks(event.getFacesContext()).destroy(vc);
         }
         map.remove(Constants.VIEWS_INITIALIZED);
 
@@ -154,12 +155,13 @@
         if (list == null) {
             return;
         }
+        if 
(!event.getFacesContext().getExternalContext().getRequestMap().containsKey(Constants.VIEW_POSTBACK))
 {
+            return;
+        }
         Iterator vcs = list.iterator();
         while (vcs.hasNext()) {
-            ViewController vc = (ViewController) vcs.next();
-            if (vc.isPostBack()) {
-                vc.preprocess();
-            }
+            Object vc = vcs.next();
+            viewControllerCallbacks(event.getFacesContext()).preprocess(vc);
         }
 
     }
@@ -175,12 +177,42 @@
     private void beforeRenderResponse(PhaseEvent event) {
 
         Map map = event.getFacesContext().getExternalContext().getRequestMap();
-        ViewController vc = (ViewController) map.get(Constants.VIEW_RENDERED);
+        Object vc = map.get(Constants.VIEW_RENDERED);
         if (vc == null) {
             return;
         }
-        vc.prerender();
+        viewControllerCallbacks(event.getFacesContext()).prerender(vc);
         map.remove(Constants.VIEW_RENDERED);
+
+    }
+
+
+    /**
+     * <p>The [EMAIL PROTECTED] ViewControllerCallbacks} instance we will use.
+     * This instance is lazily instantiated.</p>
+     */
+    private ViewControllerCallbacks viewControllerCallbacks = null;
+
+
+    /**
+     * <p>Return the [EMAIL PROTECTED] ViewControllerCallbacks} instance we
+     * will use.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     */
+    private ViewControllerCallbacks viewControllerCallbacks(FacesContext 
context) {
+
+        if (viewControllerCallbacks == null) {
+            viewControllerCallbacks = (ViewControllerCallbacks)
+               context.getExternalContext().getApplicationMap().
+               get(Constants.VIEW_CALLBACKS);
+            if (viewControllerCallbacks == null) {
+                viewControllerCallbacks = 
CallbacksFactory.getInstance().getViewControllerCallbacks();
+                context.getExternalContext().getApplicationMap().
+                put(Constants.VIEW_CALLBACKS, viewControllerCallbacks);
+            }
+        }
+        return viewControllerCallbacks;
 
     }
 

Modified: 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewViewHandler.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewViewHandler.java?rev=369152&r1=369151&r2=369152&view=diff
==============================================================================
--- 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewViewHandler.java
 (original)
+++ 
struts/shale/trunk/core-library/src/java/org/apache/shale/view/faces/ViewViewHandler.java
 Sat Jan 14 17:27:25 2006
@@ -226,21 +226,16 @@
 
         // Retrieve an existing instance, or one created and configured by
         // the managed bean facility
-        ViewController vc = null;
+        Object vc = null;
         VariableResolver vr =
             context.getApplication().getVariableResolver();
         try {
-            Object vcObject = vr.resolveVariable(context, viewName);
-            if (vcObject == null) {
+            vc = vr.resolveVariable(context, viewName);
+            if (vc == null) {
                 log.warn(messages.getMessage("view.noViewController",
                                              new Object[] { viewId, viewName 
}));
                 return;
             }
-            vc = (ViewController) vcObject;
-        } catch (ClassCastException e) {
-            log.warn(messages.getMessage("view.notViewController", 
-                                         new Object[] { viewId, viewName }));
-            return;
         } catch (EvaluationException e) {
             log.warn(messages.getMessage("view.evalException",
                                           new Object[] { viewId, viewName }), 
e);
@@ -248,8 +243,14 @@
         }
 
         // Configure the instance properties and initialize it
-        vc.setPostBack(postBack);
-        vc.init();
+        if (postBack) {
+            context.getExternalContext().getRequestMap().
+              put(Constants.VIEW_POSTBACK, Boolean.TRUE);
+        }
+        if (vc instanceof ViewController) {
+            ((ViewController) vc).setPostBack(postBack);
+        }
+        viewControllerCallbacks(context).init(vc);
 
         // Schedule this instance for later processing as needed
         Map map = context.getExternalContext().getRequestMap();
@@ -260,6 +261,40 @@
             map.put(Constants.VIEWS_INITIALIZED, list);
         }
         list.add(vc);
+
+    }
+
+
+    /**
+     * <p>The [EMAIL PROTECTED] ViewControllerCallbacks} instance we will use.
+     * This instance is lazily instantiated.</p>
+     *
+     * @since 1.0.1
+     */
+    private ViewControllerCallbacks viewControllerCallbacks = null;
+
+
+    /**
+     * <p>Return the [EMAIL PROTECTED] ViewControllerCallbacks} instance we
+     * will use.</p>
+     *
+     * @param context <code>FacesContext</code> for the current request
+     *
+     * @since 1.0.1
+     */
+    private ViewControllerCallbacks viewControllerCallbacks(FacesContext 
context) {
+
+        if (viewControllerCallbacks == null) {
+            viewControllerCallbacks = (ViewControllerCallbacks)
+               context.getExternalContext().getApplicationMap().
+               get(Constants.VIEW_CALLBACKS);
+            if (viewControllerCallbacks == null) {
+                viewControllerCallbacks = 
CallbacksFactory.getInstance().getViewControllerCallbacks();
+                context.getExternalContext().getApplicationMap().
+                put(Constants.VIEW_CALLBACKS, viewControllerCallbacks);
+            }
+        }
+        return viewControllerCallbacks;
 
     }
 

Added: 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/CallbacksFactoryTestCase.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/CallbacksFactoryTestCase.java?rev=369152&view=auto
==============================================================================
--- 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/CallbacksFactoryTestCase.java
 (added)
+++ 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/CallbacksFactoryTestCase.java
 Sat Jan 14 17:27:25 2006
@@ -0,0 +1,96 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shale.view.faces;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * <p>Test case for 
<code>org.apache.shale.view.faces.CallbacksFactory</code>.</p>
+ */
+public class CallbacksFactoryTestCase extends TestCase {
+    
+    
+    // ------------------------------------------------------------ 
Constructors
+
+
+    // Construct a new instance of this test case.
+    public CallbacksFactoryTestCase(String name) {
+        super(name);
+    }
+
+
+    // ---------------------------------------------------- Overall Test 
Methods
+
+
+    // Set up instance variables required by this test case.
+    public void setUp() {
+
+        factory = CallbacksFactory.getInstance();
+
+    }
+
+
+    // Return the tests included in this test case.
+    public static Test suite() {
+
+        return (new TestSuite(CallbacksFactoryTestCase.class));
+
+    }
+
+
+    // Tear down instance variables required by this test case.
+    public void tearDown() {
+
+        factory = null;
+
+    }
+
+
+    // ------------------------------------------------------ Instance 
Variables
+
+
+    private CallbacksFactory factory = null;
+
+
+    // ------------------------------------------------------------ Test 
Methods
+
+
+
+    // Test a prisine instance
+    public void testPristine() {
+
+        ;
+
+    }
+
+
+    // Test returning a ViewControllerCallbacks instance
+    public void testViewControllerCallbacks() {
+
+        ViewControllerCallbacks vcc = factory.getViewControllerCallbacks();
+        assertNotNull(vcc);
+        assertEquals("org.apache.shale.view.faces.ViewControllerCallbacks",
+                     vcc.getClass().getName());
+
+    }
+
+
+
+
+}

Added: 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/TestViewController.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/TestViewController.java?rev=369152&view=auto
==============================================================================
--- 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/TestViewController.java
 (added)
+++ 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/TestViewController.java
 Sat Jan 14 17:27:25 2006
@@ -0,0 +1,58 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shale.view.faces;
+
+import org.apache.shale.view.ViewController;
+
+/**
+ * <p>Test implementation of <code>ViewController</code>.</p>
+ */
+public class TestViewController implements ViewController {
+
+    private StringBuffer sb = new StringBuffer();
+
+    public void prerender() {
+        sb.append("prerender/");
+    }
+
+    public void preprocess() {
+        sb.append("preprocess/");
+    }
+
+    public void destroy() {
+        sb.append("destroy/");
+    }
+
+    public void init() {
+        sb.append("init/");
+    }
+
+    public String log() {
+        return sb.toString();
+    }
+
+    private boolean postBack = false;
+
+    public boolean isPostBack() {
+        return this.postBack;
+    }
+
+    public void setPostBack(boolean postBack) {
+        this.postBack = postBack;
+    }
+
+}

Added: 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/ViewControllerCallbacksTestCase.java
URL: 
http://svn.apache.org/viewcvs/struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/ViewControllerCallbacksTestCase.java?rev=369152&view=auto
==============================================================================
--- 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/ViewControllerCallbacksTestCase.java
 (added)
+++ 
struts/shale/trunk/core-library/src/test/org/apache/shale/view/faces/ViewControllerCallbacksTestCase.java
 Sat Jan 14 17:27:25 2006
@@ -0,0 +1,97 @@
+/*
+ * Copyright 2006 The Apache Software Foundation.
+ * 
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.shale.view.faces;
+
+import junit.framework.Test;
+import junit.framework.TestCase;
+import junit.framework.TestSuite;
+
+/**
+ * <p>Test case for 
<code>org.apache.shale.view.faces.ViewControllerCallbacks</code>.</p>
+ */
+public class ViewControllerCallbacksTestCase extends TestCase {
+    
+    
+    // ------------------------------------------------------------ 
Constructors
+
+
+    // Construct a new instance of this test case.
+    public ViewControllerCallbacksTestCase(String name) {
+        super(name);
+    }
+
+
+    // ---------------------------------------------------- Overall Test 
Methods
+
+
+    // Set up instance variables required by this test case.
+    public void setUp() {
+
+        callbacks = new ViewControllerCallbacks();
+
+    }
+
+
+    // Return the tests included in this test case.
+    public static Test suite() {
+
+        return (new TestSuite(ViewControllerCallbacksTestCase.class));
+
+    }
+
+
+    // Tear down instance variables required by this test case.
+    public void tearDown() {
+
+        callbacks = null;
+
+    }
+
+
+    // ------------------------------------------------------ Instance 
Variables
+
+
+    private ViewControllerCallbacks callbacks = null;
+
+
+    // ------------------------------------------------------------ Test 
Methods
+
+
+
+    // Test a prisine instance
+    public void testPristine() {
+
+        ;
+
+    }
+
+
+    // Test calling all of the appropriate methods in order
+    public void testViewControllerCallbacks() {
+
+        TestViewController tvc = new TestViewController();
+        callbacks.init(tvc);
+        callbacks.preprocess(tvc);
+        callbacks.prerender(tvc);
+        callbacks.destroy(tvc);
+        assertEquals("init/preprocess/prerender/destroy/",
+                     tvc.log());
+
+    }
+
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to