[jboss-svn-commits] JBoss Portal SVN: r5265 - trunk/core/src/main/org/jboss/portal/core/controller
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Sep 26 19:01:28 EDT 2006
Author: julien at jboss.com
Date: 2006-09-26 19:01:26 -0400 (Tue, 26 Sep 2006)
New Revision: 5265
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java
Log:
- in core fix bug where the send redirect is not performed between the action/render
Modified: trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java 2006-09-26 22:49:20 UTC (rev 5264)
+++ trunk/core/src/main/org/jboss/portal/core/controller/CoreController.java 2006-09-26 23:01:26 UTC (rev 5265)
@@ -187,7 +187,7 @@
}
// Find out if we can execute in the same server invocation
- if (forward.requiresRedirect(invocation))
+ if (requiresRedirect(urlContext, cmd, invocation))
{
String url = controllerContext.encodeURL(forward.getCommand(), forward.getURLContext(), null);
if (url == null)
@@ -386,40 +386,40 @@
this.urlCtx = urlCtx;
}
- public boolean requiresRedirect(ServerInvocation invocation)
+ public ControllerCommand getCommand()
{
- CommandInfo cmdInfo = cmd.getInfo();
- if (cmdInfo instanceof ActionCommandInfo && !((ActionCommandInfo)cmdInfo).isIdempotent())
+ return cmd;
+ }
+
+ public URLContext getURLContext()
+ {
+ return urlCtx;
+ }
+ }
+
+ public boolean requiresRedirect(URLContext urlCtx, ControllerCommand cmd, ServerInvocation invocation)
+ {
+ CommandInfo cmdInfo = cmd.getInfo();
+ if (cmdInfo instanceof ActionCommandInfo && !((ActionCommandInfo)cmdInfo).isIdempotent())
+ {
+ return true;
+ }
+ else
+ {
+ boolean currentAuthenticated = invocation.getServerContext().getURLContext().isAuthenticated();
+ if (urlCtx != null && currentAuthenticated != urlCtx.isAuthenticated())
{
return true;
}
else
{
- boolean currentAuthenticated = invocation.getServerContext().getURLContext().isAuthenticated();
- if (urlCtx != null && currentAuthenticated != urlCtx.isAuthenticated())
+ boolean currentSecure = invocation.getServerContext().getURLContext().getSecure();
+ if (urlCtx != null && urlCtx.getSecure() && !currentSecure)
{
return true;
}
- else
- {
- boolean currentSecure = invocation.getServerContext().getURLContext().getSecure();
- if (urlCtx != null && urlCtx.getSecure() && !currentSecure)
- {
- return true;
- }
- }
}
- return false;
}
-
- public ControllerCommand getCommand()
- {
- return cmd;
- }
-
- public URLContext getURLContext()
- {
- return urlCtx;
- }
+ return false;
}
}
More information about the jboss-svn-commits
mailing list