mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +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();
|
||||
|
||||
|
@@ -18,10 +18,12 @@ var MySpaces = {
|
||||
{
|
||||
if ($('spacePanel'))
|
||||
{
|
||||
$('spacePanelOverlay').setStyle('opacity', 0);
|
||||
MySpaces.removeModal();
|
||||
|
||||
// show AJAX loading overlay
|
||||
$('spacePanelOverlayAjax').setStyle('visibility', 'visible');
|
||||
$('spacePanel').setStyle('visibility', 'hidden');
|
||||
|
||||
// fire off the ajax request to populate the spaces list - the 'myspacespanel' webscript
|
||||
// is responsible for rendering just the contents of the main panel div
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
@@ -631,7 +633,7 @@ var MySpaces = {
|
||||
{
|
||||
if (confirm("Are you sure you want to delete: " + name))
|
||||
{
|
||||
$("spacePanelOverlay").setStyle('opacity', MySpaces.OVERLAY_OPACITY);
|
||||
MySpaces.applyModal();
|
||||
|
||||
// ajax call to delete item
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
@@ -647,13 +649,13 @@ var MySpaces = {
|
||||
else
|
||||
{
|
||||
alert("Error during delete of item: " + response.responseText);
|
||||
$("spacePanelOverlay").setStyle('opacity', 0);
|
||||
MySpaces.removeModal();
|
||||
}
|
||||
},
|
||||
failure: function(response)
|
||||
{
|
||||
alert("Error during delete of item: " + response.responseText);
|
||||
$("spacePanelOverlay").setStyle('opacity', 0);
|
||||
MySpaces.removeModal();
|
||||
}
|
||||
},
|
||||
"noderef=" + noderef
|
||||
@@ -666,7 +668,7 @@ var MySpaces = {
|
||||
*/
|
||||
checkoutItem: function(name, noderef)
|
||||
{
|
||||
$("spacePanelOverlay").setStyle('opacity', MySpaces.OVERLAY_OPACITY);
|
||||
MySpaces.applyModal();
|
||||
|
||||
// ajax call to check out item
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
@@ -682,13 +684,13 @@ var MySpaces = {
|
||||
else
|
||||
{
|
||||
alert("Error during check out of item: " + response.responseText);
|
||||
$("spacePanelOverlay").setStyle('opacity', 0);
|
||||
MySpaces.removeModal();
|
||||
}
|
||||
},
|
||||
failure: function(response)
|
||||
{
|
||||
alert("Error during check out of item: " + response.responseText);
|
||||
$("spacePanelOverlay").setStyle('opacity', 0);
|
||||
MySpaces.removeModal();
|
||||
}
|
||||
},
|
||||
"noderef=" + noderef
|
||||
@@ -700,7 +702,7 @@ var MySpaces = {
|
||||
*/
|
||||
checkinItem: function(name, noderef)
|
||||
{
|
||||
$("spacePanelOverlay").setStyle('opacity', MySpaces.OVERLAY_OPACITY);
|
||||
MySpaces.applyModal();
|
||||
|
||||
// ajax call to check in item
|
||||
YAHOO.util.Connect.asyncRequest(
|
||||
@@ -716,13 +718,13 @@ var MySpaces = {
|
||||
else
|
||||
{
|
||||
alert("Error during check in of item: " + response.responseText);
|
||||
$("spacePanelOverlay").setStyle('opacity', 0);
|
||||
MySpaces.removeModal();
|
||||
}
|
||||
},
|
||||
failure: function(response)
|
||||
{
|
||||
alert("Error during check in of item: " + response.responseText);
|
||||
$("spacePanelOverlay").setStyle('opacity', 0);
|
||||
MySpaces.removeModal();
|
||||
}
|
||||
},
|
||||
"noderef=" + noderef
|
||||
@@ -844,6 +846,16 @@ var MySpaces = {
|
||||
spacePanel.empty();
|
||||
spacePanel.removeEvents('mouseleave');
|
||||
MySpaces.start();
|
||||
},
|
||||
|
||||
applyModal: function()
|
||||
{
|
||||
$("spacePanelOverlay").setStyle('opacity', MySpaces.OVERLAY_OPACITY);
|
||||
},
|
||||
|
||||
removeModal: function()
|
||||
{
|
||||
$("spacePanelOverlay").setStyle('opacity', 0);
|
||||
}
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user