mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Fix to issue found by KevinC where a wizard launched in the "plain" container would revert to default container after first page displayed.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6229 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -60,7 +60,7 @@ public class AlfrescoNavigationHandler extends NavigationHandler
|
||||
public final static String WIZARD_PREFIX = "wizard" + OUTCOME_SEPARATOR;
|
||||
public final static String CLOSE_DIALOG_OUTCOME = DIALOG_PREFIX + "close";
|
||||
public final static String CLOSE_WIZARD_OUTCOME = WIZARD_PREFIX + "close";
|
||||
public final static String EXTERNAL_CONTAINER_REQUEST = "externalContainerRequest";
|
||||
public final static String EXTERNAL_CONTAINER_SESSION = "externalDialogContainer";
|
||||
|
||||
protected String dialogContainer = null;
|
||||
protected String wizardContainer = null;
|
||||
@@ -371,8 +371,8 @@ public class AlfrescoNavigationHandler extends NavigationHandler
|
||||
String container;
|
||||
|
||||
// determine which kind of container we need to return, if the
|
||||
// external request flag is set then use the plain container
|
||||
Object obj = context.getExternalContext().getRequestMap().get(EXTERNAL_CONTAINER_REQUEST);
|
||||
// external session flag is set then use the plain container
|
||||
Object obj = context.getExternalContext().getSessionMap().get(EXTERNAL_CONTAINER_SESSION);
|
||||
|
||||
if (obj != null && obj instanceof Boolean && ((Boolean)obj).booleanValue())
|
||||
{
|
||||
@@ -422,8 +422,8 @@ public class AlfrescoNavigationHandler extends NavigationHandler
|
||||
String container;
|
||||
|
||||
// determine which kind of container we need to return, if the
|
||||
// external request flag is set then use the plain container
|
||||
Object obj = context.getExternalContext().getRequestMap().get(EXTERNAL_CONTAINER_REQUEST);
|
||||
// external session flag is set then use the plain container
|
||||
Object obj = context.getExternalContext().getSessionMap().get(EXTERNAL_CONTAINER_SESSION);
|
||||
|
||||
if (obj != null && obj instanceof Boolean && ((Boolean)obj).booleanValue())
|
||||
{
|
||||
|
@@ -265,9 +265,9 @@ public class ExternalAccessServlet extends BaseServlet
|
||||
navigator.setCurrentNodeId(args[1]);
|
||||
}
|
||||
|
||||
// set the external container request flag so that a plain container gets used
|
||||
fc.getExternalContext().getRequestMap().put(
|
||||
AlfrescoNavigationHandler.EXTERNAL_CONTAINER_REQUEST, Boolean.TRUE);
|
||||
// set the external container session flag so that a plain container gets used
|
||||
fc.getExternalContext().getSessionMap().put(
|
||||
AlfrescoNavigationHandler.EXTERNAL_CONTAINER_SESSION, Boolean.TRUE);
|
||||
|
||||
NavigationHandler navigationHandler = fc.getApplication().getNavigationHandler();
|
||||
navigationHandler.handleNavigation(fc, null, outcome + ':' + args[0]);
|
||||
|
@@ -99,12 +99,12 @@ public class UIActionCommandProcessor implements ExtCommandProcessor
|
||||
properties.put(BaseUIActionCommand.PROP_RESPONSE, response);
|
||||
|
||||
// if the container parameter is present and equal to "plain" add the
|
||||
// external container object to the request
|
||||
// external container object to the session
|
||||
String container = request.getParameter(PARAM_CONTAINER);
|
||||
if (container != null && container.equalsIgnoreCase("plain"))
|
||||
{
|
||||
request.setAttribute(
|
||||
AlfrescoNavigationHandler.EXTERNAL_CONTAINER_REQUEST, Boolean.TRUE);
|
||||
request.getSession().setAttribute(
|
||||
AlfrescoNavigationHandler.EXTERNAL_CONTAINER_SESSION, Boolean.TRUE);
|
||||
}
|
||||
|
||||
Command cmd = CommandFactory.getInstance().createCommand(command);
|
||||
|
@@ -90,6 +90,10 @@ public abstract class BaseDialogBean implements IDialogBean
|
||||
|
||||
public String cancel()
|
||||
{
|
||||
// remove container variable
|
||||
FacesContext.getCurrentInstance().getExternalContext().getSessionMap().remove(
|
||||
AlfrescoNavigationHandler.EXTERNAL_CONTAINER_SESSION);
|
||||
|
||||
return getDefaultCancelOutcome();
|
||||
}
|
||||
|
||||
@@ -122,6 +126,10 @@ public abstract class BaseDialogBean implements IDialogBean
|
||||
// allow any subclasses to perform post commit processing
|
||||
// i.e. resetting state or setting status messages
|
||||
outcome = doPostCommitProcessing(context, outcome);
|
||||
|
||||
// remove container variable
|
||||
context.getExternalContext().getSessionMap().remove(
|
||||
AlfrescoNavigationHandler.EXTERNAL_CONTAINER_SESSION);
|
||||
}
|
||||
catch (Throwable e)
|
||||
{
|
||||
|
@@ -168,6 +168,8 @@ public class EditXmlInlineDialog extends BaseDialogBean
|
||||
@Override
|
||||
public String cancel()
|
||||
{
|
||||
super.cancel();
|
||||
|
||||
// reset the state
|
||||
this.avmEditBean.resetState();
|
||||
|
||||
|
Reference in New Issue
Block a user