beehive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ekon...@apache.org
Subject svn commit: r397233 [1/2] - in /beehive/trunk/controls/test: src/drivers/org/apache/beehive/controls/test/driver/composition/ webapps/ webapps/common/milton/resources/milton/jsp/ webapps/src/binding/ webapps/src/composition/ webapps/src/context/getothe...
Date Wed, 26 Apr 2006 16:44:58 GMT
Author: ekoneil
Date: Wed Apr 26 09:44:55 2006
New Revision: 397233

URL: http://svn.apache.org/viewcvs?rev=397233&view=rev
Log:
Code consistency...

BB: self
Test: Controls pass


Modified:
    beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/ComposerBeanDriver.java
    beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/DriveOuterControl.java
    beehive/trunk/controls/test/webapps/build.xml
    beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResults.jsp
    beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResultsTemplate.jsp
    beehive/trunk/controls/test/webapps/src/binding/BindingTests.java
    beehive/trunk/controls/test/webapps/src/composition/Controller.java
    beehive/trunk/controls/test/webapps/src/context/getotherservice/Controller.java
    beehive/trunk/controls/test/webapps/src/context/getotherservice2/Controller.java
    beehive/trunk/controls/test/webapps/src/contextevent/beanrecord/Controller.java
    beehive/trunk/controls/test/webapps/src/contextevent/implrecord/Controller.java
    beehive/trunk/controls/test/webapps/src/contextevent/implrecord2/Controller.java
    beehive/trunk/controls/test/webapps/src/event/eventhandler/Controller.java
    beehive/trunk/controls/test/webapps/src/event/listener/Controller.java
    beehive/trunk/controls/test/webapps/src/extension/Controller.java
    beehive/trunk/controls/test/webapps/src/instantiate/declarewithproperty/Controller.java
    beehive/trunk/controls/test/webapps/src/instantiate/programwithproperty/Controller.java
    beehive/trunk/controls/test/webapps/src/property/client_access/Controller.java
    beehive/trunk/controls/test/webapps/src/property/client_access2/Controller.java
    beehive/trunk/controls/test/webapps/src/property/client_impl/Controller.java
    beehive/trunk/controls/test/webapps/src/property/client_impl2/Controller.java
    beehive/trunk/controls/test/webapps/src/property/impl_access/Controller.java
    beehive/trunk/controls/test/webapps/src/property/impl_access2/Controller.java
    beehive/trunk/controls/test/webapps/src/property/membership/Controller.java
    beehive/trunk/controls/test/webapps/src/property/property_constraints/Controller.java
    beehive/trunk/controls/test/webapps/src/property/veto/Controller.java
    beehive/trunk/controls/test/webapps/src/results/Controller.java
    beehive/trunk/controls/test/webapps/web/WEB-INF/web.xml
    beehive/trunk/controls/test/webapps/web/binding/index.jsp
    beehive/trunk/controls/test/webapps/web/error.jsp
    beehive/trunk/controls/test/webapps/web/index.jsp

Modified: beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/ComposerBeanDriver.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/ComposerBeanDriver.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/ComposerBeanDriver.java (original)
+++ beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/ComposerBeanDriver.java Wed Apr 26 09:44:55 2006
@@ -37,67 +37,60 @@
         return new MiltonControlContext();
     }
 
-	/**
-	 * When one event raised to a bean instance
-	 */
-	public Report testComposerBean(Composer composerBean){
+    /**
+     * When one event raised to a bean instance
+     */
+    public Report testComposerBean(Composer composerBean) {
 
-		Report report=new Report();
+        Report report = new Report();
 
-		MiltonControlContext testContext =null;
+        MiltonControlContext testContext = null;
 
-		try{
-        	testContext = createMiltonControlContext();
+        try {
+            testContext = createMiltonControlContext();
             testContext.add(composerBean);
-		}
-		catch(Exception e){
-			report.setStatus(Report.FAIL);
-			report.setMessage("MiltonControlContext could not be created.");
-			report.setExceptionStack(e);
-
-			return report;
-		}
-
-        try
-        {
-        	testContext.beginContext();
+        }
+        catch (Exception e) {
+            report.setStatus(Report.FAIL);
+            report.setMessage("MiltonControlContext could not be created.");
+            report.setExceptionStack(e);
+
+            return report;
+        }
+
+        try {
+            testContext.beginContext();
             testContext.resetEvents();
             composerBean.invokeNestedControls();
         }
-        finally
-        {
+        finally {
             testContext.endContext();
         }
-        if(checkEvents(testContext.getEvents(),
-            new String [] { "nested1ReturnVoid", "nested1ReturnInt", "nested1ReturnString" }))
-          report.setStatus(Report.PASS);
-        else{
-          report.setStatus(Report.FAIL);
-		  report.setMessage(Arrays.toString(testContext.getEvents()));
-		}
-
-		return report;
-	}
-
-    private boolean checkEvents(String [] expectResults, String [] actualResults)
-    {
-        boolean result=true;
-
-        if (expectResults.length != actualResults.length)
-        {
-			result=false;
-        }
-		else{
-	        for (int i = 0; i < expectResults.length; i++)
-	        {
-	            if (!expectResults[i].equals(actualResults[i]))
-	            {
-					result=false;
-					break;
-	            }
-	        }
-   		}
-   		return result;
+        if (checkEvents(testContext.getEvents(),
+            new String []{"nested1ReturnVoid", "nested1ReturnInt", "nested1ReturnString"}))
+            report.setStatus(Report.PASS);
+        else {
+            report.setStatus(Report.FAIL);
+            report.setMessage(Arrays.toString(testContext.getEvents()));
+        }
+
+        return report;
+    }
+
+    private boolean checkEvents(String [] expectResults, String [] actualResults) {
+        boolean result = true;
+
+        if (expectResults.length != actualResults.length) {
+            result = false;
+        } else {
+            for (int i = 0; i < expectResults.length; i++) {
+                if (!expectResults[i].equals(actualResults[i])) {
+                    result = false;
+                    break;
+                }
+            }
+        }
+        return result;
 
     }
 }

Modified: beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/DriveOuterControl.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/DriveOuterControl.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/DriveOuterControl.java (original)
+++ beehive/trunk/controls/test/src/drivers/org/apache/beehive/controls/test/driver/composition/DriveOuterControl.java Wed Apr 26 09:44:55 2006
@@ -15,7 +15,6 @@
  *
  * $Header:$
  */
-
 package org.apache.beehive.controls.test.driver.composition;
 
 import org.apache.beehive.test.tools.milton.common.Report;
@@ -23,293 +22,276 @@
 import org.apache.beehive.controls.test.controls.composition.InnerControlBean;
 import org.apache.beehive.controls.test.controls.composition.InnerControl;
 
-/* This class contains the logic to test control composition.
- * By invoking method on OuterControl, a control containing a nested control,
- * features of control composition are verified.
+/**
+ * This class contains the logic to test control composition.  By invoking method on OuterControl,
+ * a control containing a nested control, features of control composition are verified.
  */
-public class DriveOuterControl
-{
-
-	private OuterControlBean myControl;
-
-	public void setControl(OuterControlBean aControl){
+public class DriveOuterControl {
+    private OuterControlBean myControl;
 
-		myControl=aControl;
-	}
-
-	public Report doTestInstantiate(){
-
-		Report report=new Report();
-
-		if (myControl==null){
-			report.setStatus(Report.FAIL);
-			report.setMessage("the outer control is NULL");
-		}
-		else{
-			InnerControlBean declaredNestedControl=myControl.getDeclaredNestedControl();
-
-			if (declaredNestedControl==null){
-				report.setStatus(Report.FAIL);
-				report.setMessage("the nested control instantiated declaratively is NULL");
-			}
-			else{
-				InnerControlBean programNestedControl=myControl.instantiateNestedControlProgrammatically();
-
-				if (programNestedControl==null){
-					report.setStatus(Report.FAIL);
-					report.setMessage("the nested control instantiated programmatically is NULL");
-				}
-				else
-					report.setStatus(Report.PASS);
-			}
-
-		}
-		return report;
-	}
-
-	public Report doTestInstantiateWithProperty(){
-
-		Report report=new Report();
-
-		if (myControl==null){
-			report.setStatus(Report.FAIL);
-			report.setMessage("the outer control is NULL");
-		}
-		else{
-			InnerControlBean declaredNestedControl=myControl.getDeclaredNestedControl2();
-
-			if (declaredNestedControl==null){
-				report.setStatus(Report.FAIL);
-				report.setMessage("the nested control instantiated declaratively is NULL");
-			}
-			else{
-				InnerControlBean programNestedControl=myControl.instantiateNestedControlWithProperty();
-
-				if (programNestedControl==null){
-					report.setStatus(Report.FAIL);
-					report.setMessage("Missing API:Controls. JIRA-BEEHIVE-113");
-				}
-				else
-					report.setStatus(Report.PASS);
-			}
-
-		}
-		return report;
-	}
-
-	public Report doTestGetPropertyByContext(){
-
-		Report report=doTestInstantiate();
-
-		if (report.getStatus().equals(Report.PASS)){
-
-			InnerControlBean declaredNestedControl=myControl.getDeclaredNestedControl();
-			String property_value=declaredNestedControl.getNameFromContext();
-			if(property_value!=null){
-				if (property_value.equals("Bob"))
-					report.setStatus(Report.PASS);
-				else{
-					report.setStatus(Report.FAIL);
-					report.setMessage("declarative instantiation:property retrieved from context is:"+property_value);
-				}
-			}
-			else{
-				report.setStatus(Report.FAIL);
-				report.setMessage("declarative instantiation:property retrieved from context is NULL.");
-			}
-
-			if (report.getStatus().equals(Report.PASS)){
-
-				InnerControlBean programNestedControl=myControl.instantiateNestedControlProgrammatically();
-				String property_value2=programNestedControl.getNameFromContext();
-
-				if(property_value2!=null){
-					if (property_value.equals("Bob"))
-						report.setStatus(Report.PASS);
-					else{
-						report.setStatus(Report.FAIL);
-						report.setMessage("programmatic instantiation:property retrieved from context is:"+property_value);
-					}
-				}
-				else{
-					report.setStatus(Report.FAIL);
-					report.setMessage("programmatic instantiation:property retrieved from context is NULL.");
-				}
-			}
-		}
-		return report;
-	}
-
-	public Report doTestGetPropertyByGetter(){
-
-		Report report=new Report();
-		InnerControlBean innerbean=myControl.getDeclaredNestedControl();
-		String name=innerbean.getName();
-		String job=innerbean.getJob();
-
-		if (name.equals(InnerControl.DEFAULT_NAME)&&(job==null))
-			report.setStatus(Report.PASS);
-		else{
-			report.setStatus(Report.FAIL);
-			report.setMessage("The property from getter:name="+name+"and job="+job );
-		}
-
-		if (report.getStatus().equals(Report.PASS)){
-			InnerControlBean innerbean2=myControl.getDeclaredNestedControl2();
-			String name2=innerbean2.getName();
-			String job2=innerbean2.getJob();
-
-			if (job2==null){
-				report.setStatus(Report.FAIL);
-				report.setMessage("The property reset at declaration is NULL.JIRA-BEEHIVE-126" );
-			}
-			else{
-				if (name.equals(InnerControl.DEFAULT_NAME)&&(job2.equals("farmer")))
-					report.setStatus(Report.PASS);
-				else{
-					report.setStatus(Report.FAIL);
-					report.setMessage("The property from getter:name="+name2+"and job="+job2 );
-				}
-			}
-		}
-
-		return report;
-	}
-
-	public Report doTestSetPropertyBySetter(){
-
-		Report report=new Report();
-		InnerControlBean innerbean=myControl.getDeclaredNestedControl();
-		innerbean.setName("A_NEW_NAME");
-		innerbean.setJob("A_NEW_JOB");
-
-		String name=innerbean.getNameFromContext();
-		String job=innerbean.getJobFromContext();
-
-		if (name.equals("A_NEW_NAME")&&job.equals("A_NEW_JOB"))
-			report.setStatus(Report.PASS);
-		else{
-			report.setStatus(Report.FAIL);
-			report.setMessage("The property from getter:name="+name+"and job="+job );
-		}
-		return report;
-	}
-
-	public Report doTestGetReconfiguredPropertyByContext(){
-
-		Report report=doTestInstantiateWithProperty();
-
-		if (report.getStatus().equals(Report.PASS)){
-
-			InnerControlBean declaredNestedControl=myControl.getDeclaredNestedControl2();
-			String property_value=declaredNestedControl.getJobFromContext();
-			if(property_value!=null){
-				if (property_value.equals("farmer"))
-					report.setStatus(Report.PASS);
-				else{
-					report.setStatus(Report.FAIL);
-					report.setMessage("declarative instantiation:reconfigured property retrieved from context is:"+property_value);
-				}
-			}
-			else{
-				report.setStatus(Report.FAIL);
-				report.setMessage("declarative instantiation:property retrieved from context is NULL.");
-			}
-
-			if (report.getStatus().equals(Report.PASS)){
-
-				InnerControlBean programNestedControl=myControl.instantiateNestedControlWithProperty();
-				String property_value2=programNestedControl.getJobFromContext();
-
-				if(property_value2!=null){
-					if (property_value.equals("farmer"))
-						report.setStatus(Report.PASS);
-					else{
-						report.setStatus(Report.FAIL);
-						report.setMessage("programmatic instantiation:reconfigured property retrieved from context is:"+property_value);
-					}
-				}
-				else{
-					report.setStatus(Report.FAIL);
-					report.setMessage("programmatic instantiation:property retrieved from context is NULL.");
-				}
-			}
-		}
-
-		return report;
-	}
-
-	public Report doTestEventHandler(){
-
-		Report report=new Report();
-
-		if (myControl==null){
-			report.setStatus(Report.FAIL);
-			report.setMessage("the outer control is NULL");
-		}
-		else{
-			String wakeupResult=myControl.testActivityWakeup();
-			String readMessageResult=myControl.testActivityReadMessage();
-			String reportResult=myControl.testActivityReport();
-			String shoppingResult=myControl.testActionShopping();
-			String dostuffResult=myControl.testActionDostuff();
-
-			if (wakeupResult.equals("0") && readMessageResult.equals("0") && reportResult.equals("0")
-				&& shoppingResult.equals("0") && dostuffResult.equals("0"))
-				report.setStatus(Report.PASS);
-			else{
-				report.setStatus(Report.FAIL);
-				report.setMessage("ActivityWakeup:"+wakeupResult+
-									". ActivityReadMessage:"+ readMessageResult+
-									". ActivityReport:"+reportResult+
-									". ActionShopping:"+shoppingResult+
-									". ActionDodtuff:"+dostuffResult);
-			}
-		}
-
-		return report;
-	}
-
-	public Report doTestEventListener(){
-
-		Report report=new Report();
-
-		if (myControl==null){
-			report.setStatus(Report.FAIL);
-			report.setMessage("the outer control is NULL");
-		}
-		else{
-			String eventListener=myControl.testEventListener();
-
-			if (eventListener.equals("0"))
-				report.setStatus(Report.PASS);
-			else{
-				report.setStatus(Report.FAIL);
-				report.setMessage("EventListener:"+ eventListener);
-			}
-		}
-
-		return report;
-	}
-
-	public Report doTestEventInnerClass(){
-
-		Report report=new Report();
-		if (myControl==null){
-			report.setStatus(Report.FAIL);
-			report.setMessage("the outer control is NULL");
-		}
-		else{
-			String innerClassListener=myControl.testInnerClassListener();
-
-			if (innerClassListener.equals("0"))
-				report.setStatus(Report.PASS);
-			else{
-				report.setStatus(Report.FAIL);
-				report.setMessage("InnerClassListener:"+ innerClassListener);
-			}
-		}
+    public void setControl(OuterControlBean aControl) {
+        myControl = aControl;
+    }
+
+    public Report doTestInstantiate() {
+
+        Report report = new Report();
+
+        if (myControl == null) {
+            report.setStatus(Report.FAIL);
+            report.setMessage("the outer control is NULL");
+        } else {
+            InnerControlBean declaredNestedControl = myControl.getDeclaredNestedControl();
+
+            if (declaredNestedControl == null) {
+                report.setStatus(Report.FAIL);
+                report.setMessage("the nested control instantiated declaratively is NULL");
+            } else {
+                InnerControlBean programNestedControl = myControl.instantiateNestedControlProgrammatically();
+
+                if (programNestedControl == null) {
+                    report.setStatus(Report.FAIL);
+                    report.setMessage("the nested control instantiated programmatically is NULL");
+                } else
+                    report.setStatus(Report.PASS);
+            }
+
+        }
+        return report;
+    }
+
+    public Report doTestInstantiateWithProperty() {
+
+        Report report = new Report();
+
+        if (myControl == null) {
+            report.setStatus(Report.FAIL);
+            report.setMessage("the outer control is NULL");
+        } else {
+            InnerControlBean declaredNestedControl = myControl.getDeclaredNestedControl2();
+
+            if (declaredNestedControl == null) {
+                report.setStatus(Report.FAIL);
+                report.setMessage("the nested control instantiated declaratively is NULL");
+            } else {
+                InnerControlBean programNestedControl = myControl.instantiateNestedControlWithProperty();
+
+                if (programNestedControl == null) {
+                    report.setStatus(Report.FAIL);
+                    report.setMessage("Missing API:Controls. JIRA-BEEHIVE-113");
+                } else
+                    report.setStatus(Report.PASS);
+            }
+
+        }
+        return report;
+    }
+
+    public Report doTestGetPropertyByContext() {
+
+        Report report = doTestInstantiate();
+
+        if (report.getStatus().equals(Report.PASS)) {
+
+            InnerControlBean declaredNestedControl = myControl.getDeclaredNestedControl();
+            String property_value = declaredNestedControl.getNameFromContext();
+            if (property_value != null) {
+                if (property_value.equals("Bob"))
+                    report.setStatus(Report.PASS);
+                else {
+                    report.setStatus(Report.FAIL);
+                    report.setMessage("declarative instantiation:property retrieved from context is:" + property_value);
+                }
+            } else {
+                report.setStatus(Report.FAIL);
+                report.setMessage("declarative instantiation:property retrieved from context is NULL.");
+            }
+
+            if (report.getStatus().equals(Report.PASS)) {
+
+                InnerControlBean programNestedControl = myControl.instantiateNestedControlProgrammatically();
+                String property_value2 = programNestedControl.getNameFromContext();
+
+                if (property_value2 != null) {
+                    if (property_value.equals("Bob"))
+                        report.setStatus(Report.PASS);
+                    else {
+                        report.setStatus(Report.FAIL);
+                        report.setMessage("programmatic instantiation:property retrieved from context is:" + property_value);
+                    }
+                } else {
+                    report.setStatus(Report.FAIL);
+                    report.setMessage("programmatic instantiation:property retrieved from context is NULL.");
+                }
+            }
+        }
+        return report;
+    }
+
+    public Report doTestGetPropertyByGetter() {
+
+        Report report = new Report();
+        InnerControlBean innerbean = myControl.getDeclaredNestedControl();
+        String name = innerbean.getName();
+        String job = innerbean.getJob();
+
+        if (name.equals(InnerControl.DEFAULT_NAME) && (job == null))
+            report.setStatus(Report.PASS);
+        else {
+            report.setStatus(Report.FAIL);
+            report.setMessage("The property from getter:name=" + name + "and job=" + job);
+        }
+
+        if (report.getStatus().equals(Report.PASS)) {
+            InnerControlBean innerbean2 = myControl.getDeclaredNestedControl2();
+            String name2 = innerbean2.getName();
+            String job2 = innerbean2.getJob();
+
+            if (job2 == null) {
+                report.setStatus(Report.FAIL);
+                report.setMessage("The property reset at declaration is NULL.JIRA-BEEHIVE-126");
+            } else {
+                if (name.equals(InnerControl.DEFAULT_NAME) && (job2.equals("farmer")))
+                    report.setStatus(Report.PASS);
+                else {
+                    report.setStatus(Report.FAIL);
+                    report.setMessage("The property from getter:name=" + name2 + "and job=" + job2);
+                }
+            }
+        }
+
+        return report;
+    }
+
+    public Report doTestSetPropertyBySetter() {
+
+        Report report = new Report();
+        InnerControlBean innerbean = myControl.getDeclaredNestedControl();
+        innerbean.setName("A_NEW_NAME");
+        innerbean.setJob("A_NEW_JOB");
+
+        String name = innerbean.getNameFromContext();
+        String job = innerbean.getJobFromContext();
+
+        if (name.equals("A_NEW_NAME") && job.equals("A_NEW_JOB"))
+            report.setStatus(Report.PASS);
+        else {
+            report.setStatus(Report.FAIL);
+            report.setMessage("The property from getter:name=" + name + "and job=" + job);
+        }
+        return report;
+    }
+
+    public Report doTestGetReconfiguredPropertyByContext() {
+
+        Report report = doTestInstantiateWithProperty();
+
+        if (report.getStatus().equals(Report.PASS)) {
+
+            InnerControlBean declaredNestedControl = myControl.getDeclaredNestedControl2();
+            String property_value = declaredNestedControl.getJobFromContext();
+            if (property_value != null) {
+                if (property_value.equals("farmer"))
+                    report.setStatus(Report.PASS);
+                else {
+                    report.setStatus(Report.FAIL);
+                    report.setMessage("declarative instantiation:reconfigured property retrieved from context is:" + property_value);
+                }
+            } else {
+                report.setStatus(Report.FAIL);
+                report.setMessage("declarative instantiation:property retrieved from context is NULL.");
+            }
+
+            if (report.getStatus().equals(Report.PASS)) {
+
+                InnerControlBean programNestedControl = myControl.instantiateNestedControlWithProperty();
+                String property_value2 = programNestedControl.getJobFromContext();
+
+                if (property_value2 != null) {
+                    if (property_value.equals("farmer"))
+                        report.setStatus(Report.PASS);
+                    else {
+                        report.setStatus(Report.FAIL);
+                        report.setMessage("programmatic instantiation:reconfigured property retrieved from context is:" + property_value);
+                    }
+                } else {
+                    report.setStatus(Report.FAIL);
+                    report.setMessage("programmatic instantiation:property retrieved from context is NULL.");
+                }
+            }
+        }
+
+        return report;
+    }
+
+    public Report doTestEventHandler() {
+
+        Report report = new Report();
+
+        if (myControl == null) {
+            report.setStatus(Report.FAIL);
+            report.setMessage("the outer control is NULL");
+        } else {
+            String wakeupResult = myControl.testActivityWakeup();
+            String readMessageResult = myControl.testActivityReadMessage();
+            String reportResult = myControl.testActivityReport();
+            String shoppingResult = myControl.testActionShopping();
+            String dostuffResult = myControl.testActionDostuff();
+
+            if (wakeupResult.equals("0") && readMessageResult.equals("0") && reportResult.equals("0")
+                && shoppingResult.equals("0") && dostuffResult.equals("0"))
+                report.setStatus(Report.PASS);
+            else {
+                report.setStatus(Report.FAIL);
+                report.setMessage("ActivityWakeup:" + wakeupResult +
+                    ". ActivityReadMessage:" + readMessageResult +
+                    ". ActivityReport:" + reportResult +
+                    ". ActionShopping:" + shoppingResult +
+                    ". ActionDodtuff:" + dostuffResult);
+            }
+        }
+
+        return report;
+    }
+
+    public Report doTestEventListener() {
+
+        Report report = new Report();
+
+        if (myControl == null) {
+            report.setStatus(Report.FAIL);
+            report.setMessage("the outer control is NULL");
+        } else {
+            String eventListener = myControl.testEventListener();
+
+            if (eventListener.equals("0"))
+                report.setStatus(Report.PASS);
+            else {
+                report.setStatus(Report.FAIL);
+                report.setMessage("EventListener:" + eventListener);
+            }
+        }
+
+        return report;
+    }
+
+    public Report doTestEventInnerClass() {
+
+        Report report = new Report();
+        if (myControl == null) {
+            report.setStatus(Report.FAIL);
+            report.setMessage("the outer control is NULL");
+        } else {
+            String innerClassListener = myControl.testInnerClassListener();
+
+            if (innerClassListener.equals("0"))
+                report.setStatus(Report.PASS);
+            else {
+                report.setStatus(Report.FAIL);
+                report.setMessage("InnerClassListener:" + innerClassListener);
+            }
+        }
 
-		return report;
-	}
+        return report;
+    }
 }

Modified: beehive/trunk/controls/test/webapps/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/build.xml?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/build.xml (original)
+++ beehive/trunk/controls/test/webapps/build.xml Wed Apr 26 09:44:55 2006
@@ -114,13 +114,13 @@
         <path id="webapp.classpath">
             <pathelement location="${classes.dir}"/>
             <fileset dir="${webapp.build.dir}/WEB-INF/lib" includes="*.jar"/>
-        </path>    
+        </path>
 
         <!-- 
-            this directory needs to get whacked before every build so 
-            that control interface repackagings don't cause stale
-            files to be compiled 
-          -->
+          this directory needs to get whacked before every build so
+          that control interface repackagings don't cause stale
+          files to be compiled
+        -->
         <delete dir="${sourcegen.dir}" includeEmptyDirs="true"/>
 
         <mkdir dir="${classes.dir}"/>
@@ -139,8 +139,8 @@
             <pathelement location="${jsp-api.jar}"/>
         </path>
 
-        <taskdef name="apt" 
-                 classname="org.apache.beehive.controls.runtime.generator.AptTask" 
+        <taskdef name="apt"
+                 classname="org.apache.beehive.controls.runtime.generator.AptTask"
                  classpathref="build.classpath"
                  onerror="fail"/>
 
@@ -199,7 +199,7 @@
     <target name="_inject.test.controls.jar" if="do.inject.test.controls.jar">
         <echo message="Injecting Controls Jar"/>
         <copy todir="${webapp.build.dir}/WEB-INF/lib"
-              file="${controlstestbeans.jar}" 
+              file="${controlstestbeans.jar}"
               verbose="true"
               overwrite="true"/>
     </target>
@@ -217,7 +217,7 @@
         <echo message="Injecting Drivers Jar"/>
         <copy todir="${webapp.build.dir}/WEB-INF/lib"
               file="${controlstestdrivers.jar}"
-              verbose="true" 
+              verbose="true"
               overwrite="true"/>
     </target>
 
@@ -288,7 +288,9 @@
     </target>
 
     <target name="ensure.deployed" description="Deploy webapp for the test recorder">
-        <echo>Ensuring that the webapp ${context.path} is deployed on a running server at the URL ${webapp.waitfor.url}</echo>
+        <echo>Ensuring that the webapp ${context.path} is deployed on a running server at the URL
+            ${webapp.waitfor.url}
+        </echo>
 
         <waitfor maxwait="5" maxwaitunit="second" timeoutproperty="unavailable">
             <http url="${webapp.waitfor.url}"/>

Modified: beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResults.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResults.jsp?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResults.jsp (original)
+++ beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResults.jsp Wed Apr 26 09:44:55 2006
@@ -1,14 +1,15 @@
-<!-- WARNING: This file is part of the test framework.  It is copied 
-              into this webapp at build time. Any changes you make to 
-              this file will be lost the next time you rebuild.  
-              DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+<!-- WARNING: This file is part of the test framework. It is copied
+into this webapp at build time. Any changes you make to
+this file will be lost the next time you rebuild.
+DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
 
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <html>
-    <head>
-        <title>Milton Test Results</title>
-    </head>
-    <body>
-        <jsp:include page="miltonResultsTemplate.jsp" />
-    </body>
+<head>
+    <title>Milton Test Results</title>
+</head>
+
+<body>
+<jsp:include page="miltonResultsTemplate.jsp"/>
+</body>
 </html>

Modified: beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResultsTemplate.jsp
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResultsTemplate.jsp?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResultsTemplate.jsp (original)
+++ beehive/trunk/controls/test/webapps/common/milton/resources/milton/jsp/miltonResultsTemplate.jsp Wed Apr 26 09:44:55 2006
@@ -1,14 +1,14 @@
-<!-- WARNING: This file is part of the test framework.  It is copied 
-              into this webapp at build time. Any changes you make to 
-              this file will be lost the next time you rebuild.  
-              DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
+<!-- WARNING: This file is part of the test framework. It is copied
+into this webapp at build time. Any changes you make to
+this file will be lost the next time you rebuild.
+DO NOT ADD THIS FILE TO YOUR WEBAPP! -->
 
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 
-<%@ page import="org.apache.beehive.test.tools.milton.common.Report"%>
-<%@ page import="org.apache.beehive.netui.pageflow.PageFlowUtils"%>
+<%@ page import="org.apache.beehive.netui.pageflow.PageFlowUtils" %>
+<%@ page import="org.apache.beehive.test.tools.milton.common.Report" %>
 
-<% Report report = (Report)PageFlowUtils.getPageInput(Report.KEY, request); %>
+<% Report report = (Report) PageFlowUtils.getPageInput(Report.KEY, request); %>
 
 <table border="1" id="<% out.print(Report.RESULT_TABLE_ID); %>">
     <tr>

Modified: beehive/trunk/controls/test/webapps/src/binding/BindingTests.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/binding/BindingTests.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/binding/BindingTests.java (original)
+++ beehive/trunk/controls/test/webapps/src/binding/BindingTests.java Wed Apr 26 09:44:55 2006
@@ -17,29 +17,24 @@
  */
 package binding;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
 import org.apache.beehive.controls.api.bean.Control;
 import org.apache.beehive.controls.api.properties.BaseProperties;
 import org.apache.beehive.controls.test.controls.binding.BindingTestControl;
 import org.apache.beehive.controls.test.controls.binding.DefaultBindingTestControl;
 import org.apache.beehive.controls.test.controls.binding.ExternalBindingTestControl;
-
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
 import org.apache.beehive.test.tools.milton.common.Report;
 
 @Jpf.Controller(
-    forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    }
+    forwards = {@Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)}
 )
 public class BindingTests
     extends PageFlowController {
 
     @Control
-    @BaseProperties( controlImplementation="org.apache.beehive.controls.test.controls.binding.BindingTestControlOverrideImpl" )
+    @BaseProperties(controlImplementation = "org.apache.beehive.controls.test.controls.binding.BindingTestControlOverrideImpl")
     public BindingTestControl btc;
 
     @Control
@@ -50,7 +45,7 @@
 
     @Jpf.Action
     protected Forward begin() {
-        return new Forward(Report.RESULTS, Report.KEY, new Report(Report.ABORT,"begin() is not a test method!"));
+        return new Forward(Report.RESULTS, Report.KEY, new Report(Report.ABORT, "begin() is not a test method!"));
     }
 
     @Jpf.Action

Modified: beehive/trunk/controls/test/webapps/src/composition/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/composition/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/composition/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/composition/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,68 +17,67 @@
  */
 package composition;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
 import org.apache.beehive.controls.api.bean.Control;
 import org.apache.beehive.controls.test.controls.composition.OuterControlBean;
 import org.apache.beehive.controls.test.driver.composition.DriveOuterControl;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test control composition by invoking methods on a control that has nested controls*/
-
+/**
+ * Test control composition by invoking methods on a control that has nested controls
+ * */
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
 public class Controller
     extends PageFlowController {
 
     @Control
     public OuterControlBean outercontrol;
-    
+
 
     @Jpf.Action()
     protected Forward begin() {
-        Report report =new Report();
+        Report report = new Report();
         report.setStatus(Report.PASS);
         report.setMessage("This is a bogus test.");
 
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
-    
+
     /*
     * Verifies the instantiation of nested controls.
     * The outer control is instantiated declaratively.
     */
     @Jpf.Action()
-    protected Forward testInstantiation(){
-        DriveOuterControl driver=new DriveOuterControl();
+    protected Forward testInstantiation() {
+        DriveOuterControl driver = new DriveOuterControl();
         driver.setControl(outercontrol);
-        Report report=driver.doTestInstantiate();
+        Report report = driver.doTestInstantiate();
         return new Forward(Report.RESULTS, Report.KEY, report);
-    }    
+    }
 
     /*
-     * Verifies the instantiation of nested controls.
-     * The outer control is instantiated programmatically.
-     */
-     @Jpf.Action()
-    protected Forward testInstantiationP(){
+    * Verifies the instantiation of nested controls.
+    * The outer control is instantiated programmatically.
+    */
+    @Jpf.Action()
+    protected Forward testInstantiationP() {
 
-        DriveOuterControl driver=new DriveOuterControl();
+        DriveOuterControl driver = new DriveOuterControl();
 
-        Report report=new Report();
-        try{
-            OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-                Thread.currentThread().getContextClassLoader() ,
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
                 "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
             driver.setControl(outerbean);
-            report=driver.doTestInstantiate();
+            report = driver.doTestInstantiate();
         }
-        catch(Exception e){
+        catch (Exception e) {
 
             report.setStatus(Report.FAIL);
             report.setExceptionStack(e);
@@ -93,40 +92,40 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testInstantiationWithProperty(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestInstantiateWithProperty();
-	
+    )
+    protected Forward testInstantiationWithProperty() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestInstantiateWithProperty();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
-    } 
+    }
 
     /*
-     * Verifies the instantiation of nested control, if the property of the nested control is
-     * is reconfigured when instantiated.
-     * The outer control is instantiated programmatically.
-     */
+    * Verifies the instantiation of nested control, if the property of the nested control is
+    * is reconfigured when instantiated.
+    * The outer control is instantiated programmatically.
+    */
     @Jpf.Action(
-        )
-    protected Forward testInstantiationWithPropertyP(){
+    )
+    protected Forward testInstantiationWithPropertyP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestInstantiateWithProperty();
+        }
+        catch (Exception e) {
 
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestInstantiateWithProperty();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
         }
-	
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -135,39 +134,39 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testGetPropertyByContext(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestGetPropertyByContext();
-	
+    )
+    protected Forward testGetPropertyByContext() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestGetPropertyByContext();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
-    } 
+    }
 
     /*
-     * Tests getting control property from the context of the nested control. 
-     * The outer control is instantiated programmatically.
-     */
+    * Tests getting control property from the context of the nested control.
+    * The outer control is instantiated programmatically.
+    */
     @Jpf.Action(
-        )
-    protected Forward testGetPropertyByContextP(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestGetPropertyByContext();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+    )
+    protected Forward testGetPropertyByContextP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestGetPropertyByContext();
         }
-	
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
+        }
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -176,13 +175,13 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testGetPropertyByGetter(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestGetPropertyByGetter();
-	
+    )
+    protected Forward testGetPropertyByGetter() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestGetPropertyByGetter();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -191,24 +190,24 @@
      * The outer control is instantiated programmatically.
      */
     @Jpf.Action(
-        )
-    protected Forward testGetPropertyByGetterP(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestGetPropertyByGetter();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+    )
+    protected Forward testGetPropertyByGetterP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestGetPropertyByGetter();
+        }
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
         }
-	
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -217,13 +216,13 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testSetPropertyBySetter(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestSetPropertyBySetter();
-	
+    )
+    protected Forward testSetPropertyBySetter() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestSetPropertyBySetter();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -232,24 +231,24 @@
      * The outer control is instantiated programmatically.
      */
     @Jpf.Action(
-        )
-    protected Forward testSetPropertyBySetterP(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestSetPropertyBySetter();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+    )
+    protected Forward testSetPropertyBySetterP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestSetPropertyBySetter();
         }
-	
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
+        }
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -259,13 +258,13 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testGetReconfiguredPropertyByContext(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestGetReconfiguredPropertyByContext();
-	
+    )
+    protected Forward testGetReconfiguredPropertyByContext() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestGetReconfiguredPropertyByContext();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -275,24 +274,24 @@
      * The outer control is instantiated programmatically.
      */
     @Jpf.Action(
-        )
-    protected Forward testGetReconfiguredPropertyByContextP(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestGetReconfiguredPropertyByContext();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+    )
+    protected Forward testGetReconfiguredPropertyByContextP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestGetReconfiguredPropertyByContext();
+        }
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
         }
-	
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -302,13 +301,13 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testEventHandler(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestEventHandler();
-	
+    )
+    protected Forward testEventHandler() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestEventHandler();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -318,24 +317,24 @@
      * The outer control is instantiated programmatically.
      */
     @Jpf.Action(
-        )
-    protected Forward testEventHandlerP(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestEventHandler();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+    )
+    protected Forward testEventHandlerP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestEventHandler();
         }
-	
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
+        }
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -345,13 +344,13 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testEventListener(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestEventListener();
-	
+    )
+    protected Forward testEventListener() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestEventListener();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -361,24 +360,24 @@
      * The outer control is instantiated programmatically.
      */
     @Jpf.Action(
-        )
-    protected Forward testEventListenerP(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestEventListener();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+    )
+    protected Forward testEventListenerP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestEventListener();
+        }
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
         }
-	
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -388,13 +387,13 @@
      * The outer control is instantiated declaratively.
      */
     @Jpf.Action(
-        )
-    protected Forward testInnerClassListener(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	driver.setControl(outercontrol);
-	Report report=driver.doTestEventInnerClass();
-	
+    )
+    protected Forward testInnerClassListener() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        driver.setControl(outercontrol);
+        Report report = driver.doTestEventInnerClass();
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
@@ -404,25 +403,25 @@
      * The outer control is instantiated programmatically.
      */
     @Jpf.Action(
-        )
-    protected Forward testInnerClassListenerP(){
-    	
-	DriveOuterControl driver=new DriveOuterControl();
-	Report report=new Report();
-	try{
-		OuterControlBean outerbean=(OuterControlBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.composition.OuterControlBean");
-		driver.setControl(outerbean);
-		report=driver.doTestEventInnerClass();
-        }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+    )
+    protected Forward testInnerClassListenerP() {
+
+        DriveOuterControl driver = new DriveOuterControl();
+        Report report = new Report();
+        try {
+            OuterControlBean outerbean = (OuterControlBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.composition.OuterControlBean");
+            driver.setControl(outerbean);
+            report = driver.doTestEventInnerClass();
         }
-	
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
+        }
+
         return new Forward(Report.RESULTS, Report.KEY, report);
-  }  
-   
+    }
+
 }

Modified: beehive/trunk/controls/test/webapps/src/context/getotherservice/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/context/getotherservice/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/context/getotherservice/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/context/getotherservice/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,36 +17,34 @@
  */
 package context.getotherservice;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
 import org.apache.beehive.controls.api.bean.Control;
 import org.apache.beehive.controls.test.controls.context.ServiceGetterBean;
 import org.apache.beehive.controls.test.driver.context.DriveServiceGetter;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test getting other services avaliable to control context
+/**
+ * Test getting other services avaliable to control context
  * The control is instantiated declaratively
  */
-
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
 public class Controller
     extends PageFlowController {
     @Control
     public ServiceGetterBean serviceGetter;
-    
+
     @Jpf.Action()
-    protected Forward begin(){
-    	
-        DriveServiceGetter driver=new DriveServiceGetter();
+    protected Forward begin() {
+
+        DriveServiceGetter driver = new DriveServiceGetter();
         driver.setControl(serviceGetter);
-        driver.setTestEnv(true,true,false);
-        Report report=driver.doTest();
+        driver.setTestEnv(true, true, false);
+        Report report = driver.doTest();
 
         return new Forward(Report.RESULTS, Report.KEY, report);
     }

Modified: beehive/trunk/controls/test/webapps/src/context/getotherservice2/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/context/getotherservice2/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/context/getotherservice2/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/context/getotherservice2/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,50 +17,46 @@
  */
 package context.getotherservice2;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.controls.test.controls.context.ServiceGetterBean;
+import org.apache.beehive.controls.test.driver.context.DriveServiceGetter;
+import org.apache.beehive.netui.pageflow.Forward;
 import org.apache.beehive.netui.pageflow.PageFlowControlContainer;
 import org.apache.beehive.netui.pageflow.PageFlowControlContainerFactory;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
 import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
-import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.bean.ControlBean;
-import org.apache.beehive.controls.test.controls.context.ServiceGetterBean;
-import org.apache.beehive.controls.test.driver.context.DriveServiceGetter;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test getting other services avaliable to control context
+/**
+ * Test getting other services avaliable to control context
  * The control is instantiated programmatically
  */
-
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
 public class Controller
     extends PageFlowController {
 
     @Jpf.Action()
-    protected Forward begin(){
-
-    	Report report=new Report();
-	DriveServiceGetter driver=new DriveServiceGetter();
-	try{
-                PageFlowControlContainer pfcc = PageFlowControlContainerFactory.getControlContainer(getRequest(),getServletContext());
-                pfcc.createAndBeginControlBeanContext(this,getRequest(),getResponse(),getServletContext());
+    protected Forward begin() {
 
-		ServiceGetterBean serviceGetter=(ServiceGetterBean)java.beans.Beans.instantiate(
-			Thread.currentThread().getContextClassLoader() ,
-			"org.apache.beehive.controls.test.controls.context.ServiceGetterBean");
-		driver.setControl(serviceGetter);
-		driver.setTestEnv(true,true,false);
-		report=driver.doTest();
+        Report report = new Report();
+        DriveServiceGetter driver = new DriveServiceGetter();
+        try {
+            PageFlowControlContainer pfcc = PageFlowControlContainerFactory.getControlContainer(getRequest(), getServletContext());
+            pfcc.createAndBeginControlBeanContext(this, getRequest(), getResponse(), getServletContext());
+
+            ServiceGetterBean serviceGetter = (ServiceGetterBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.context.ServiceGetterBean");
+            driver.setControl(serviceGetter);
+            driver.setTestEnv(true, true, false);
+            report = driver.doTest();
         }
-        catch(Exception e){
-		
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
+        catch (Exception e) {
+
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
         }
         return new Forward(Report.RESULTS, Report.KEY, report);
     }

Modified: beehive/trunk/controls/test/webapps/src/contextevent/beanrecord/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/contextevent/beanrecord/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/contextevent/beanrecord/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/contextevent/beanrecord/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,26 +17,22 @@
  */
 package contextevent.beanrecord;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-import java.lang.Thread;
 import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.bean.ControlBean;
 import org.apache.beehive.controls.test.controls.contextevent.RecorderBean;
 import org.apache.beehive.controls.test.driver.contextevent.DriveBeanRecorder;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test linstening to control life cycle events by adding listeners to
- * control bean class.
+/**
+ * Test linstening to control life cycle events by adding listeners to control bean class.
  * The control is instantiated declaratively
  */
-
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
 public class Controller
     extends PageFlowController {
 
@@ -44,22 +40,22 @@
     public RecorderBean recorder;
 
     @Jpf.Action()
-    protected Forward begin(){
-    	
-	DriveBeanRecorder driver=new DriveBeanRecorder();
-	driver.setControl(recorder);
-	Report report=driver.testBeanContextEvent();
-	report=driver.testResourceContextEvent();
-	
-	try{
-		Thread.currentThread().sleep(500);
-		report=driver.getResult();
-	}
-	catch(Exception e){
-		report.setStatus(Report.FAIL);
-		report.setExceptionStack(e);
-	}
-	
+    protected Forward begin() {
+
+        DriveBeanRecorder driver = new DriveBeanRecorder();
+        driver.setControl(recorder);
+        Report report = driver.testBeanContextEvent();
+        report = driver.testResourceContextEvent();
+
+        try {
+            Thread.sleep(500);
+            report = driver.getResult();
+        }
+        catch (Exception e) {
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
+        }
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 }

Modified: beehive/trunk/controls/test/webapps/src/contextevent/implrecord/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/contextevent/implrecord/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/contextevent/implrecord/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/contextevent/implrecord/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,26 +17,22 @@
  */
 package contextevent.implrecord;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
 import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.bean.ControlBean;
 import org.apache.beehive.controls.test.controls.contextevent.RecorderBean;
 import org.apache.beehive.controls.test.driver.contextevent.DriveRecorder;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test linstening to control life cycle events by EventHandler on control
- * implementation class.
+/**
+ * Test linstening to control life cycle events by EventHandler on control implementation class.
  * The control is instantiated declaratively
  */
-
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
 public class Controller
     extends PageFlowController {
 
@@ -44,10 +40,10 @@
     public RecorderBean recorder;
 
     @Jpf.Action()
-    protected Forward begin(){
-        DriveRecorder driver=new DriveRecorder();
+    protected Forward begin() {
+        DriveRecorder driver = new DriveRecorder();
         driver.setControl(recorder);
-        Report report=driver.doTest();
+        Report report = driver.doTest();
 
         return new Forward(Report.RESULTS, Report.KEY, report);
     }

Modified: beehive/trunk/controls/test/webapps/src/contextevent/implrecord2/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/contextevent/implrecord2/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/contextevent/implrecord2/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/contextevent/implrecord2/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,51 +17,47 @@
  */
 package contextevent.implrecord2;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.controls.test.controls.contextevent.RecorderBean;
+import org.apache.beehive.controls.test.driver.contextevent.DriveRecorder;
+import org.apache.beehive.netui.pageflow.Forward;
 import org.apache.beehive.netui.pageflow.PageFlowControlContainer;
 import org.apache.beehive.netui.pageflow.PageFlowControlContainerFactory;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
+import org.apache.beehive.netui.pageflow.PageFlowController;
 import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
-import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.bean.ControlBean;
-import org.apache.beehive.controls.test.controls.contextevent.RecorderBean;
-import org.apache.beehive.controls.test.driver.contextevent.DriveRecorder;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test linstening to control life cycle events by EventHandler on control
- * implementation class.
+/**
+ * Test linstening to control life cycle events by EventHandler on control implementation class.
  * The control is instantiated programmatically
- */
-
+  */
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
 public class Controller
     extends PageFlowController {
-   @Jpf.Action()
-    protected Forward begin(){
-    	
-       Report report =new Report();
-       DriveRecorder driver=new DriveRecorder();
 
-       try{
-	   PageFlowControlContainer pfcc = PageFlowControlContainerFactory.getControlContainer(getRequest(),getServletContext());
-	   pfcc.createAndBeginControlBeanContext(this,getRequest(),getResponse(),getServletContext());
+    @Jpf.Action()
+    protected Forward begin() {
+
+        Report report = new Report();
+        DriveRecorder driver = new DriveRecorder();
+
+        try {
+            PageFlowControlContainer pfcc = PageFlowControlContainerFactory.getControlContainer(getRequest(), getServletContext());
+            pfcc.createAndBeginControlBeanContext(this, getRequest(), getResponse(), getServletContext());
 
-           RecorderBean recorder=(RecorderBean)java.beans.Beans.instantiate(
-               Thread.currentThread().getContextClassLoader() ,
-               "org.apache.beehive.controls.test.controls.contextevent.RecorderBean");
-           driver.setControl(recorder);
-           report=driver.doTest();
-       }
-       catch(Exception e){           
-           report.setStatus(Report.FAIL);
-           report.setExceptionStack(e);
-       }
-       return new Forward(Report.RESULTS, Report.KEY, report);
+            RecorderBean recorder = (RecorderBean) java.beans.Beans.instantiate(
+                Thread.currentThread().getContextClassLoader(),
+                "org.apache.beehive.controls.test.controls.contextevent.RecorderBean");
+            driver.setControl(recorder);
+            report = driver.doTest();
+        }
+        catch (Exception e) {
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
+        }
+        return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
 }

Modified: beehive/trunk/controls/test/webapps/src/event/eventhandler/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/event/eventhandler/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/event/eventhandler/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/event/eventhandler/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,107 +17,100 @@
  */
 package event.eventhandler;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
 import org.apache.beehive.controls.api.bean.Control;
-import org.apache.beehive.controls.api.bean.ControlBean;
 import org.apache.beehive.controls.api.events.EventHandler;
 import org.apache.beehive.controls.test.controls.event.HelloBean;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test receiving events raised by a control using EventHandler annotations
+/**
+ * Test receiving events raised by a control using EventHandler annotations
  * The control is instantiated declaratively
  */
-
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
-public class Controller extends PageFlowController
-{
-	
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
+public class Controller extends PageFlowController {
+
     @Control
     public HelloBean myHelloBean;
-    
-    private boolean eventSet1Received=false;
-    private boolean eventSet2Received=false;
-
-    /** EventHandler that receives EventSet1 from myHelloBean*/
-    @EventHandler (field="myHelloBean", eventSet= HelloBean.EventSet1.class,
-                                   eventName="method1")
-     public void myHelloBeanMessageHandler()
-     {
-		eventSet1Received=true;
-     }
-
-
-    /** EventHandler that receives EventSet2 from myHelloBean*/
-    @EventHandler (field="myHelloBean", eventSet= HelloBean.EventSet2.class, eventName="set2Method2")
-     public int myHelloBeanMessageHandler2()
-     {
-		eventSet2Received=true;
-		return 0;
-     }
 
+    private boolean eventSet1Received = false;
+    private boolean eventSet2Received = false;
 
+    /**
+     * EventHandler that receives EventSet1 from myHelloBean
+     */
+    @EventHandler(field = "myHelloBean", eventSet = HelloBean.EventSet1.class, eventName = "method1")
+    public void myHelloBeanMessageHandler() {
+        eventSet1Received = true;
+    }
 
+    /**
+     * EventHandler that receives EventSet2 from myHelloBean
+     */
+    @EventHandler(field = "myHelloBean", eventSet = HelloBean.EventSet2.class, eventName = "set2Method2")
+    public int myHelloBeanMessageHandler2() {
+        eventSet2Received = true;
+        return 0;
+    }
 
     @Jpf.Action(
-        )
-    protected Forward begin(){
-	
-	//Invoke method on myHelloBean to trigger the events
-
-		Report report=new Report();
-	
-		try{
-			myHelloBean.triggerEvents();
-			report.setStatus(Report.PASS);
-
-			if (eventSet1Received && eventSet2Received)
-				report.setStatus(Report.PASS);
-			else{
-				report.setStatus(Report.FAIL);
-			
-				String detail="";
-				if (!eventSet1Received)
-					detail="EventSet1 is not received.";
-				if (!eventSet2Received)
-					detail=detail+"EventSet2 is not received.";
-				report.setMessage(detail);
-			}
-		}
-		catch(Exception e){
-			report.setStatus(Report.FAIL);
-			report.setExceptionStack(e);
-	
-		}
+    )
+    protected Forward begin() {
+
+        //Invoke method on myHelloBean to trigger the events
+
+        Report report = new Report();
+
+        try {
+            myHelloBean.triggerEvents();
+            report.setStatus(Report.PASS);
+
+            if (eventSet1Received && eventSet2Received)
+                report.setStatus(Report.PASS);
+            else {
+                report.setStatus(Report.FAIL);
+
+                String detail = "";
+                if (!eventSet1Received)
+                    detail = "EventSet1 is not received.";
+                if (!eventSet2Received)
+                    detail = detail + "EventSet2 is not received.";
+                report.setMessage(detail);
+            }
+        }
+        catch (Exception e) {
+            report.setStatus(Report.FAIL);
+            report.setExceptionStack(e);
+
+        }
 
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 
     @Jpf.Action(
-        )
-    protected Forward verifyResult(){
-    	
-	Report report=new Report();
-	
-	if (eventSet1Received && eventSet2Received)
-		report.setStatus(Report.PASS);
-	else{
-		report.setStatus(Report.FAIL);
-		
-		String detail="";
-		if (!eventSet1Received)
-			detail="EventSet1 is not received.";
-		if (!eventSet2Received)
-			detail=detail+"EventSet2 is not received.";
-		report.setMessage(detail);
-	}
-	
+    )
+    protected Forward verifyResult() {
+
+        Report report = new Report();
+
+        if (eventSet1Received && eventSet2Received)
+            report.setStatus(Report.PASS);
+        else {
+            report.setStatus(Report.FAIL);
+
+            String detail = "";
+            if (!eventSet1Received)
+                detail = "EventSet1 is not received.";
+            if (!eventSet2Received)
+                detail = detail + "EventSet2 is not received.";
+            report.setMessage(detail);
+        }
+
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 

Modified: beehive/trunk/controls/test/webapps/src/event/listener/Controller.java
URL: http://svn.apache.org/viewcvs/beehive/trunk/controls/test/webapps/src/event/listener/Controller.java?rev=397233&r1=397232&r2=397233&view=diff
==============================================================================
--- beehive/trunk/controls/test/webapps/src/event/listener/Controller.java (original)
+++ beehive/trunk/controls/test/webapps/src/event/listener/Controller.java Wed Apr 26 09:44:55 2006
@@ -17,48 +17,47 @@
  */
 package event.listener;
 
-import org.apache.beehive.netui.pageflow.PageFlowController;
-import org.apache.beehive.netui.pageflow.Forward;
-import org.apache.beehive.netui.pageflow.FormData;
-import org.apache.beehive.netui.pageflow.annotations.Jpf;
-
 import org.apache.beehive.controls.api.bean.Control;
 import org.apache.beehive.controls.test.controls.event.HelloBean;
 import org.apache.beehive.controls.test.driver.event.DriveListener;
+import org.apache.beehive.netui.pageflow.Forward;
+import org.apache.beehive.netui.pageflow.PageFlowController;
+import org.apache.beehive.netui.pageflow.annotations.Jpf;
 import org.apache.beehive.test.tools.milton.common.Report;
 
-/* Test receiving events raised by a control using a registered listener
+/**
+ * Test receiving events raised by a control using a registered listener
  * The control is instantiated declaratively
  */
 
 @Jpf.Controller(
     forwards = {
-        @Jpf.Forward(name=Report.RESULTS,path = Report.RESULTSJSP) 
-    })
+    @Jpf.Forward(name = Report.RESULTS, path = Report.RESULTSJSP)
+        })
 public class Controller
     extends PageFlowController {
 
     @Control
     public HelloBean hello;
-    
+
     @Jpf.Action()
-    protected Forward begin(){
-    	
-	DriveListener driver=new DriveListener();
-	driver.setControl(hello);
-	Report report=driver.doTest();
-	
-	if (report.getStatus().equals(Report.PASS)){
-
-	    try{
-		Thread.currentThread().sleep(1000);
-		report=driver.verifyResult();
-		}
-	    catch(Exception e){
-	    	report.setStatus(Report.FAIL);
-	    	report.setExceptionStack(e);
-	    }
-	}
+    protected Forward begin() {
+
+        DriveListener driver = new DriveListener();
+        driver.setControl(hello);
+        Report report = driver.doTest();
+
+        if (report.getStatus().equals(Report.PASS)) {
+
+            try {
+                Thread.sleep(1000);
+                report = driver.verifyResult();
+            }
+            catch (Exception e) {
+                report.setStatus(Report.FAIL);
+                report.setExceptionStack(e);
+            }
+        }
         return new Forward(Report.RESULTS, Report.KEY, report);
     }
 }



Mime
View raw message