[cvs]
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller
Transition.java
JCorporate Ltd
jcorp at jcorp2.servlets.net
Thu Jun 17 00:54:29 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-serv22855/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller
Modified Files:
Transition.java
Log Message:
fix getParameterString(boolean) which was not following promise of boolean (to include controller or not)
Index: Transition.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/core/controller/Transition.java,v
retrieving revision 1.49
retrieving revision 1.50
diff -C2 -d -r1.49 -r1.50
*** Transition.java 27 May 2004 17:41:50 -0000 1.49
--- Transition.java 17 Jun 2004 07:54:26 -0000 1.50
***************
*** 444,447 ****
--- 444,452 ----
} /* getParams() */
+ /**
+ * @param includeControllerParameter whether to include controller param or not.
+ * @return parameter string which includes all params added to trans, as well
+ * as state param. controller param added optionally
+ */
public String getParamString(boolean includeControllerParameter) {
if (constructedParamString == null) {
***************
*** 449,465 ****
try {
if (controllerObject != null && includeControllerParameter) {
! //Determine if we're transitioning between controllers. If so, then
! //add the controller parameter. If not, then omit it. [Makes for
! //cleaner URLs]
! if (getOwnerController() != null) {
! if (!getOwnerController().equals(getControllerObject())) {
!
! paramString.append("controller=");
! paramString.append(controllerObject);
! }
! } else {
! paramString.append("controller=");
! paramString.append(controllerObject);
! }
}
--- 454,459 ----
try {
if (controllerObject != null && includeControllerParameter) {
! paramString.append("controller=");
! paramString.append(controllerObject);
}
***************
*** 930,934 ****
*
* @param resolveControllerReference should the controller be resolved to
! * a mapping or should it just be the request path with a controler equals
* parameter. True if you want the URL mapped to a .do mapping.
* @return java.lang.String
--- 924,928 ----
*
* @param resolveControllerReference should the controller be resolved to
! * a mapping, or should it just be the request path with a controller equals
* parameter. True if you want the URL mapped to a .do mapping.
* @return java.lang.String
***************
*** 1019,1023 ****
* This URL is optimized, so it includes a "controller" param only if
* the destination controller is different than the controller of the ControllerResponse (if
! * the response is known). For a guaranteed controller param,
*
* @return java.lang.String
--- 1013,1018 ----
* This URL is optimized, so it includes a "controller" param only if
* the destination controller is different than the controller of the ControllerResponse (if
! * the response is known). For a guaranteed controller param, see getSubmitUrl(),
! * which is useful for Submit buttons which may need to use 'universal dispatch'.
*
* @return java.lang.String
More information about the cvs
mailing list