[cvs] expresso commit by rauld: removed @todo tags for the validator

JCorporate Ltd jcorp at jcorp2.servlets.net
Sat Dec 4 02:28:53 PST 2004


Log Message:
-----------
removed @todo tags for the validator integration. They were there before I had CVS write access so changes would be easily found if submitted by email.

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller:
        Controller.java

Revision Data
-------------
Index: Controller.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Controller.java,v
retrieving revision 1.106
retrieving revision 1.107
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Controller.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Controller.java -u -r1.106 -r1.107
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Controller.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Controller.java
@@ -1069,7 +1069,7 @@
 
             //If the state's form is blank then use the controller's form - if it's of ControllerForm type
             if (stateFormClass.equals("")) {
-                /** @todo change instanceof ControllerForm for instanceof DefaultForm  *RD* Mon Jul 27 2004 */
+                /** changed instanceof ControllerForm for instanceof DefaultForm  *RD* Mon Jul 27 2004 */
                 if (controllerForm instanceof DefaultForm) {
                     return (StateForm) controllerForm;
                 } else {
@@ -1177,14 +1177,13 @@
 
         setupReturnToSender(nextState, myRequest);
 
-        /** @todo  added to help struts validator to find the state to go back to
+        /** added to help struts validator to find the state to go back to
          * if an error is found in the form  *RD* Mon Jul 27 2004 */
         PersistentSession mySession = myRequest.getSession();
         mySession.removePersistentAttribute("previousState");
         mySession.setPersistentAttribute("previousState", newState);
         mySession.removePersistentAttribute("previousController");
         mySession.setPersistentAttribute("previousController", this.getClass().getName());
-        /** @todo end addition  *RD* Mon Jul 27 2004 */
 
 
 
@@ -1587,10 +1586,8 @@
             throws IOException, ServletException {
         long beginTimer = System.currentTimeMillis();
 
-        /** @todo to avoid nullPointerExceptions we initialize here the error collection  *RD* Mon Jul 27 2004 */
-        /** @todo add this line  *RD* Mon Jul 27 2004 */
+        /** to avoid nullPointerExceptions we initialize here the error collection  *RD* Mon Jul 27 2004 */
         ErrorCollection actionErrors = new ErrorCollection();
-        /** @todo end addition  *RD* Mon Jul 27 2004 */
 
         // Call newState directly if we were called from a dispatch in Transition.
         ControllerRequest queuedRequest = (ControllerRequest) request.getAttribute(
@@ -1613,7 +1610,7 @@
             }
 
             // TODO: Why are we repopulating the bean? *PP* Tue Jan 27 11:19:15 GMT 2004
-            /** @todo I commented out the code and nothing seems broken. The form is already populated *RD* Mon Jul 27 2004 */
+            /** I commented out the code and nothing seems broken. The form is already populated *RD* Mon Jul 27 2004 */
             /*try {
                 BeanUtils.populate(form, queuedRequest.getParameters());
             } catch (Exception e) {
@@ -1624,37 +1621,35 @@
 
             try {
                 queuedRequest.setFormAttribute(mapping.getAttribute());
-                /** @todo test if this action must be automatically validated.
+                /** test if this action must be automatically validated.
                  * If it's the case validate the form.  *RD* Mon Jul 27 2004 */
-                /** @todo replace
+                /** replaced
                  * queuedResponse = newState(queuedState, queuedRequest);
                  * with all this  *RD* Mon Jul 27 2004 */
-                /** @todo start addition  *RD* Mon Jul 27 2004 */
                 if (mapping.getValidate()) {
                     actionErrors = (ErrorCollection) form.validate(mapping, request);
                 }
-                /** @todo test if there are no validation errors  *RD* Mon Jul 27 2004 */
+                /** test if there are no validation errors  *RD* Mon Jul 27 2004 */
                 if (actionErrors.size() == 0) {
-                    /** @todo no errors: forward to the handle state  *RD* Mon Jul 27 2004 */
+                    /**no errors: forward to the handle state  *RD* Mon Jul 27 2004 */
                     queuedResponse = newState(queuedState, queuedRequest);
                 } else {
-                    /** @todo errors: forward control to the prompt state  *RD* Mon Jul 27 2004 */
-                    /** @todo retrieve the previous controller and states parameters from the session  *RD* Mon Jul 27 2004 */
+                    /** errors: forward control to the prompt state  *RD* Mon Jul 27 2004 */
+                    /** retrieve the previous controller and states parameters from the session  *RD* Mon Jul 27 2004 */
                     String previousController = request.getSession().getAttribute("previousController").toString();
                     String previousState = request.getSession().getAttribute("previousState").toString();
-                    /** @todo test if the prompt state belongs to this same controller  *RD* Mon Jul 27 2004 */
+                    /** test if the prompt state belongs to this same controller  *RD* Mon Jul 27 2004 */
                     if (previousController.equals(this.getClass().getName())) {
                         queuedResponse = newState(StringUtil.notNull(previousState),
                                 queuedRequest);
                         queuedResponse.saveErrors(actionErrors);
                     } else {
-                        /** @todo if not transition to the new controller  *RD* Mon Jul 27 2004 */
+                        /** if not transition to the new controller  *RD* Mon Jul 27 2004 */
                         transition(StringUtil.notNull(previousState),Class.forName(StringUtil.notNull(previousController)),queuedRequest, new ControllerResponse());
                     }
 
                 }
-                /** @todo end addition  *RD* Mon Jul 27 2004 */
-            } catch (Exception e) {
+              } catch (Exception e) {
                 request.setAttribute(ExpressoConstants.NEWSTATE_EXCEPTION_KEY, e);
                 //push back the exception
                 return (null);
@@ -1911,8 +1906,8 @@
                     throw new ServletException(e);
                 }
                          }*/
-            /** @todo corrected this  *RD* Mon Jul 27 2004 */
-            /** @todo  we populate the DefaultForm with the contents of the HTML form  *RD* Mon Jul 27 2004 */
+            /** corrected this  *RD* Mon Jul 27 2004 */
+            /** we populate the DefaultForm with the contents of the HTML form  *RD* Mon Jul 27 2004 */
             if (form instanceof DefaultForm) {
                 try {
                     ((DefaultForm) form).setUsingHashtableParameters(req.getParameters());
@@ -1921,7 +1916,7 @@
                     throw new ServletException(ex);
                 }
             }
-            /** @todo I commented out the code and nothing seems broken. The form is already populated *RD* Mon Jul 27 2004 */
+            /** I commented out the code and nothing seems broken. The form is already populated *RD* Mon Jul 27 2004 */
             /*else {
                      try {
                        BeanUtils.populate(form, req.getParameters());
@@ -1949,35 +1944,33 @@
             // ============================================================
             ControllerResponse res = null;
             try {
-                /** @todo test if this action must be automatically validated.
-                 * If it's the case validate the form.  *RD* Mon Jul 27 2004 */
-                /** @todo replace
+                /** test if this action must be automatically validated.
+                 * If it's the case validate the form.  *RD* Mon Jul 27 2004
+                 * replaced
                  * res = newState(StringUtil.notNull(previousState), req);
                  * with all this  *RD* Mon Jul 27 2004 */
 
-                /** @todo start addition  *RD* Mon Jul 27 2004 */
                 if (mapping.getValidate()) {
                     actionErrors = (ErrorCollection) form.validate(mapping, request);
                 }
-                /** @todo test if there are no validation errors  *RD* Mon Jul 27 2004 */
+                /** test if there are no validation errors  *RD* Mon Jul 27 2004 */
                 if (actionErrors.size() == 0) {
-                    /** @todo no errors: forward to the handle state  *RD* Mon Jul 27 2004 */
+                    /** no errors: forward to the handle state  *RD* Mon Jul 27 2004 */
                     res = newState(StringUtil.notNull(requestedState), req);
                 } else {
-                    /** @todo errors: forward control to the prompt state  *RD* Mon Jul 27 2004 */
-                    /** @todo retrieve the previous controller and states parameters from the session  *RD* Mon Jul 27 2004 */
+                    /** errors: forward control to the prompt state  *RD* Mon Jul 27 2004 */
+                    /** etrieve the previous controller and states parameters from the session  *RD* Mon Jul 27 2004 */
                     String previousController = request.getSession().getAttribute("previousController").toString();
                     String previousState = request.getSession().getAttribute("previousState").toString();
-                    /** @todo test if the prompt state belongs to this same controller  *RD* Mon Jul 27 2004 */
+                    /** test if the prompt state belongs to this same controller  *RD* Mon Jul 27 2004 */
                     if (previousController.equals(this.getClass().getName())) {
                         res = newState(StringUtil.notNull(previousState), req);
                         res.saveErrors(actionErrors);
                     } else {
-                        /** @todo if not transition to the new controller  *RD* Mon Jul 27 2004 */
+                        /** if not transition to the new controller  *RD* Mon Jul 27 2004 */
                         transition(StringUtil.notNull(previousState),Class.forName(StringUtil.notNull(previousController)),req, new ControllerResponse());
                     }
                 }
-                /** @todo end addition  *RD* Mon Jul 27 2004 */
 
             } finally {
                 if (form != null && "session".equals(mapping.getScope())) {


More information about the cvs mailing list