Problem mit userbanner behoben.
git-svn-id: https://svn.libreccm.org/ccm/trunk@897 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
74fb0b9aa4
commit
9c810f3e97
|
|
@ -62,6 +62,7 @@ public class UserBanner extends SimpleComponent {
|
||||||
* @param state
|
* @param state
|
||||||
* @param parent
|
* @param parent
|
||||||
*/
|
*/
|
||||||
|
@Override
|
||||||
public void generateXML(PageState state,
|
public void generateXML(PageState state,
|
||||||
Element parent) {
|
Element parent) {
|
||||||
init();
|
init();
|
||||||
|
|
|
||||||
|
|
@ -22,14 +22,14 @@ import com.arsdigita.util.Assert;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A signal that requests to commit or abort the current transaction
|
* <p>A signal that requests to commit or abort the current transaction and to
|
||||||
* and to send a redirect to a new URL. BaseServlet traps this signal
|
* send a redirect to a new URL. BaseServlet traps this signal when it is thrown
|
||||||
* when it is thrown and finishes the transaction before it sends the
|
* and finishes the transaction before it sends the redirect to the response.
|
||||||
* redirect to the response. This way the client cannot see state
|
* This way the client cannot see state inconsistent with work performed in the
|
||||||
* inconsistent with work performed in the previous request.</p>
|
* previous request.</p>
|
||||||
*
|
*
|
||||||
* <p><code>RedirectSignal</code>s are usually sent after doing work
|
* <p><code>RedirectSignal</code>s are usually sent after doing work on behalf
|
||||||
* on behalf of the user:</p>
|
* of the user:</p>
|
||||||
*
|
*
|
||||||
* <blockquote><pre>
|
* <blockquote><pre>
|
||||||
* private final void saveUserSettings(final HttpServletRequest sreq) {
|
* private final void saveUserSettings(final HttpServletRequest sreq) {
|
||||||
|
|
@ -52,10 +52,18 @@ import org.apache.log4j.Logger;
|
||||||
*/
|
*/
|
||||||
public class RedirectSignal extends TransactionSignal {
|
public class RedirectSignal extends TransactionSignal {
|
||||||
|
|
||||||
|
/** Logger instance for debugging support. */
|
||||||
private static final Logger s_log = Logger.getLogger(RedirectSignal.class);
|
private static final Logger s_log = Logger.getLogger(RedirectSignal.class);
|
||||||
|
|
||||||
|
/** Destination URL where redirect to */
|
||||||
private final String m_url;
|
private final String m_url;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Constructor
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @param isCommitRequested
|
||||||
|
*/
|
||||||
public RedirectSignal(final String url, final boolean isCommitRequested) {
|
public RedirectSignal(final String url, final boolean isCommitRequested) {
|
||||||
super(isCommitRequested);
|
super(isCommitRequested);
|
||||||
|
|
||||||
|
|
@ -75,6 +83,12 @@ public class RedirectSignal extends TransactionSignal {
|
||||||
m_url = url;
|
m_url = url;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Convenience Constructor for URL objects.
|
||||||
|
*
|
||||||
|
* @param url
|
||||||
|
* @param isCommitRequested
|
||||||
|
*/
|
||||||
public RedirectSignal(final URL url, final boolean isCommitRequested) {
|
public RedirectSignal(final URL url, final boolean isCommitRequested) {
|
||||||
this(url.toString(), isCommitRequested);
|
this(url.toString(), isCommitRequested);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -853,7 +853,7 @@ public class URL {
|
||||||
return URL.there(sreq, app, pathInfo);
|
return URL.there(sreq, app, pathInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final URL excursion(final HttpServletRequest sreq,
|
public static URL excursion(final HttpServletRequest sreq,
|
||||||
final String path,
|
final String path,
|
||||||
final ParameterMap params) {
|
final ParameterMap params) {
|
||||||
if (s_log.isDebugEnabled()) {
|
if (s_log.isDebugEnabled()) {
|
||||||
|
|
@ -867,7 +867,7 @@ public class URL {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
public final URL excursion(final HttpServletRequest sreq,
|
public static URL excursion(final HttpServletRequest sreq,
|
||||||
final String path) {
|
final String path) {
|
||||||
return URL.excursion(sreq, path, new ParameterMap());
|
return URL.excursion(sreq, path, new ParameterMap());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue