[cvs]
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller
Controller.java
JCorporate Ltd
jcorp at jcorp2.servlets.net
Fri May 21 18:19:36 PDT 2004
Update of /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller
In directory jcorp2.servlets.net:/tmp/cvs-serv10937/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller
Modified Files:
Controller.java
Log Message:
remove use of ugly equals() override in State, and add convenience method for getting param values w/ same name
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.88
retrieving revision 1.89
diff -C2 -d -r1.88 -r1.89
*** Controller.java 27 Apr 2004 21:24:09 -0000 1.88
--- Controller.java 22 May 2004 01:19:34 -0000 1.89
***************
*** 1009,1013 ****
}
! return finalState.equals(newState);
}
--- 1009,1013 ----
}
! return finalState.getName().equals(newState);
}
***************
*** 1206,1210 ****
! if (!statusResponse.getCurrentState().equals(oneHandleState)) {
return statusResponse; //The handler didn't return cleanly so bail out.
}
--- 1206,1210 ----
! if (!statusResponse.getCurrentState().getName().equals(oneHandleState.getName())) {
return statusResponse; //The handler didn't return cleanly so bail out.
}
***************
*** 2499,2503 ****
if ((nextTransition == null) &&
! (nextState.equals(getFinalState()))) {
if (getControllerChainingTransition() != null) {
--- 2499,2503 ----
if ((nextTransition == null) &&
! (nextState.getName().equals(getFinalState().getName()))) {
if (getControllerChainingTransition() != null) {
***************
*** 3114,3116 ****
--- 3114,3128 ----
}
+ /**
+ * Fetches array of parameter values from underlying HTTP request; use this in a web app to access
+ * the underlying parameters in the HTTP request which have the same name; parameters with the same name are not
+ * reflected in the hashtable maintained by ControllerRequest;
+ * @param request cast ControllerRequest to get required type
+ * @param paramName key to look for among all parameters
+ *
+ * @return an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.
+ */
+ public static String[] getParamValues(ServletControllerRequest request, String paramName) {
+ return request.getParamValues(paramName);
+ }
} /* Controller */
More information about the cvs
mailing list