Merged V1.3 to HEAD(3126:3160)

svn merge svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3126 svn://www.alfresco.org:3691/alfresco/BRANCHES/V1.3@3160 .


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3405 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-07-26 10:16:23 +00:00
parent 8330b9b924
commit 5cc8c52eac
8 changed files with 113 additions and 31 deletions

View File

@@ -26,6 +26,7 @@ import javax.faces.context.FacesContext;
import org.alfresco.config.Config;
import org.alfresco.config.ConfigService;
import org.alfresco.web.app.servlet.ExternalAccessServlet;
import org.alfresco.web.bean.NavigationBean;
import org.alfresco.web.bean.dialog.DialogManager;
import org.alfresco.web.bean.repository.Node;
@@ -623,14 +624,28 @@ public class AlfrescoNavigationHandler extends NavigationHandler
}
else
{
// we are trying to close a dialog when one hasn't been opened!
// log a warning and return a null outcome to stay on the same page
if (logger.isWarnEnabled())
// the details pages can be loaded via the external access servlet,
// if this is the case the details page would not have been loaded as
// a dialog, in this scenario just use the global "browse" outcome.
String referer = (String)context.getExternalContext().
getRequestHeaderMap().get("referer");
if ((referer != null) &&
((referer.indexOf(ExternalAccessServlet.OUTCOME_DOCDETAILS) != -1) ||
(referer.indexOf(ExternalAccessServlet.OUTCOME_SPACEDETAILS) != -1)))
{
logger.warn("Attempting to close a " + closingItem + " with an empty view stack, returning null outcome");
navigate(context, fromAction, "browse");
}
else
{
// we are trying to close a dialog when one hasn't been opened!
// log a warning and return a null outcome to stay on the same page
if (logger.isWarnEnabled())
{
logger.warn("Attempting to close a " + closingItem + " with an empty view stack, returning null outcome");
}
navigate(context, fromAction, null);
}
navigate(context, fromAction, null);
}
}

View File

@@ -62,11 +62,11 @@ public class ExternalAccessServlet extends BaseServlet
private static Log logger = LogFactory.getLog(ExternalAccessServlet.class);
private final static String OUTCOME_DOCDETAILS = "showDocDetails";
private final static String OUTCOME_SPACEDETAILS = "showSpaceDetails";
private final static String OUTCOME_BROWSE = "browse";
private final static String OUTCOME_MYALFRESCO = "myalfresco";
private final static String OUTCOME_LOGOUT = "logout";
public final static String OUTCOME_DOCDETAILS = "showDocDetails";
public final static String OUTCOME_SPACEDETAILS = "showSpaceDetails";
public final static String OUTCOME_BROWSE = "browse";
public final static String OUTCOME_MYALFRESCO = "myalfresco";
public final static String OUTCOME_LOGOUT = "logout";
private static final String ARG_TEMPLATE = "template";
private static final String ARG_PAGE = "page";