Fix to (unreported?) issue where the details page for the wrong node would be shown after pressing Close in Multilingual Dialog.

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@12697 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Kevin Roast
2009-01-12 19:44:34 +00:00
parent 10bc69cc63
commit 0e2cbde7b3
2 changed files with 11 additions and 11 deletions

View File

@@ -74,6 +74,7 @@ import org.alfresco.web.app.context.UIContextService;
import org.alfresco.web.app.servlet.DownloadContentServlet; import org.alfresco.web.app.servlet.DownloadContentServlet;
import org.alfresco.web.app.servlet.FacesHelper; import org.alfresco.web.app.servlet.FacesHelper;
import org.alfresco.web.bean.content.DocumentDetailsDialog; import org.alfresco.web.bean.content.DocumentDetailsDialog;
import org.alfresco.web.bean.ml.MultilingualManageDialog;
import org.alfresco.web.bean.repository.MapNode; import org.alfresco.web.bean.repository.MapNode;
import org.alfresco.web.bean.repository.Node; import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.NodePropertyResolver; import org.alfresco.web.bean.repository.NodePropertyResolver;
@@ -1764,9 +1765,12 @@ public class BrowseBean implements IContextListener, Serializable
NodeRef translation = new NodeRef(Repository.getStoreRef(), id); NodeRef translation = new NodeRef(Repository.getStoreRef(), id);
// remember the bean from wich the action comes // remember the bean from which the action comes
DocumentDetailsDialog docDetails = (DocumentDetailsDialog)FacesContext.getCurrentInstance().getExternalContext().getSessionMap().get("DocumentDetailsDialog"); FacesContext fc = FacesContext.getCurrentInstance();
DocumentDetailsDialog docDetails = (DocumentDetailsDialog)FacesHelper.getManagedBean(fc, "DocumentDetailsDialog");
docDetails.setTranslationDocument(new MapNode(translation)); docDetails.setTranslationDocument(new MapNode(translation));
MultilingualManageDialog mmDialog = (MultilingualManageDialog)FacesHelper.getManagedBean(fc, "MultilingualManageDialog");
mmDialog.setTranslationDocument(docDetails.getTranslationDocument());
// set the ml container as the current document // set the ml container as the current document
NodeRef mlContainer = getMultilingualContentService().getTranslationContainer(translation); NodeRef mlContainer = getMultilingualContentService().getTranslationContainer(translation);

View File

@@ -38,15 +38,11 @@
<property-name>versionService</property-name> <property-name>versionService</property-name>
<value>#{VersionService}</value> <value>#{VersionService}</value>
</managed-property> </managed-property>
<managed-property>
<property-name>translationDocument</property-name>
<value>#{DocumentDetailsDialog.translationDocument}</value>
</managed-property>
</managed-bean> </managed-bean>
<managed-bean> <managed-bean>
<description> <description>
The bean for the Manage Permissions. The bean for Manage WCM Permissions.
</description> </description>
<managed-bean-name>ManagePermissionsDialog</managed-bean-name> <managed-bean-name>ManagePermissionsDialog</managed-bean-name>
<managed-bean-class> <managed-bean-class>
@@ -65,7 +61,7 @@
<managed-bean> <managed-bean>
<description> <description>
The bean that make a document multilingual The bean that makes a document multilingual
</description> </description>
<managed-bean-name>MakeMultilingualDialog</managed-bean-name> <managed-bean-name>MakeMultilingualDialog</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.ml.MakeMultilingualDialog</managed-bean-class> <managed-bean-class>org.alfresco.web.bean.ml.MakeMultilingualDialog</managed-bean-class>
@@ -110,7 +106,7 @@
<managed-bean> <managed-bean>
<description> <description>
The bean that edit the multilinguals properties of a document The bean that edits the multilinguals properties of a document
</description> </description>
<managed-bean-name>EditMLContainerDialog</managed-bean-name> <managed-bean-name>EditMLContainerDialog</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.ml.EditMLContainerDialog</managed-bean-class> <managed-bean-class>org.alfresco.web.bean.ml.EditMLContainerDialog</managed-bean-class>
@@ -151,7 +147,7 @@
<managed-bean> <managed-bean>
<description> <description>
The bean that add a new translation without content The bean that adds a new translation without content
</description> </description>
<managed-bean-name>AddTranslationWithoutContentDialog</managed-bean-name> <managed-bean-name>AddTranslationWithoutContentDialog</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.ml.AddTranslationWithoutContentDialog</managed-bean-class> <managed-bean-class>org.alfresco.web.bean.ml.AddTranslationWithoutContentDialog</managed-bean-class>
@@ -184,7 +180,7 @@
<managed-bean> <managed-bean>
<description> <description>
The bean that add a translation with a content The bean that adds a translation with a content
</description> </description>
<managed-bean-name>AddTranslationDialog</managed-bean-name> <managed-bean-name>AddTranslationDialog</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.ml.AddTranslationDialog</managed-bean-class> <managed-bean-class>org.alfresco.web.bean.ml.AddTranslationDialog</managed-bean-class>