You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by im...@apache.org on 2006/06/21 18:42:09 UTC
svn commit: r416033 -
/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/conversation/UIEnsureConversation.java
Author: imario
Date: Wed Jun 21 09:42:09 2006
New Revision: 416033
URL: http://svn.apache.org/viewvc?rev=416033&view=rev
Log:
made the ensureConversation tag work, now still the problem is, that I'll loose the messages due to the redirect
Modified:
myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/conversation/UIEnsureConversation.java
Modified: myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/conversation/UIEnsureConversation.java
URL: http://svn.apache.org/viewvc/myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/conversation/UIEnsureConversation.java?rev=416033&r1=416032&r2=416033&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/conversation/UIEnsureConversation.java (original)
+++ myfaces/tomahawk/trunk/sandbox/core/src/main/java/org/apache/myfaces/custom/conversation/UIEnsureConversation.java Wed Jun 21 09:42:09 2006
@@ -87,16 +87,13 @@
{
conversationManager.getMessager().setConversationNotActive(context, getName());
- Object response = context.getExternalContext().getResponse();
- if (response instanceof HttpServletResponse)
- {
- ((HttpServletResponse) response).sendRedirect(getRedirectTo());
+ String actionUrl = context.getApplication().getViewHandler().getActionURL(
+ context, getRedirectTo());
- context.responseComplete();
- return;
- }
+ context.getExternalContext().redirect(
+ context.getExternalContext().encodeActionURL(actionUrl));
- log.error("conversation " + getName() + " not active, but we cant redirect as " + response + " is not a HttpServletResponse");
+ return;
}
}