Merge of all UI clustering changes originally applied to 2.2

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8292 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2008-02-15 14:59:11 +00:00
parent d20d8a7007
commit a450598ecb
281 changed files with 17771 additions and 15322 deletions

View File

@@ -24,6 +24,8 @@
*/
package org.alfresco.web.bean.ml;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Locale;
import java.util.Map;
@@ -37,6 +39,7 @@ import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.web.bean.users.UserPreferencesBean;
import org.alfresco.web.bean.dialog.BaseDialogBean;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
/**
* Dialog bean to add a new translation without content. I means, a new node is created
@@ -46,7 +49,9 @@ import org.alfresco.web.bean.repository.Node;
*/
public class AddTranslationWithoutContentDialog extends BaseDialogBean
{
private MultilingualContentService multilingualContentService;
private static final long serialVersionUID = -1252453783397533792L;
transient private MultilingualContentService multilingualContentService;
private UserPreferencesBean userPreferencesBean;
// the translation being to be created
@@ -80,12 +85,12 @@ public class AddTranslationWithoutContentDialog extends BaseDialogBean
Locale locale = I18NUtil.parseLocale(language);
// add the empty translation
newTranslation = multilingualContentService.addEmptyTranslation(refNode, null, locale);
newTranslation = getMultilingualContentService().addEmptyTranslation(refNode, null, locale);
// set the properties
nodeService.setProperty(newTranslation, ContentModel.PROP_DESCRIPTION, description);
nodeService.setProperty(newTranslation, ContentModel.PROP_AUTHOR, author);
nodeService.setProperty(newTranslation, ContentModel.PROP_TITLE, title);
getNodeService().setProperty(newTranslation, ContentModel.PROP_DESCRIPTION, description);
getNodeService().setProperty(newTranslation, ContentModel.PROP_AUTHOR, author);
getNodeService().setProperty(newTranslation, ContentModel.PROP_TITLE, title);
// redirect the user according the value of (show other properties)
if(showOtherProperties)
@@ -114,6 +119,16 @@ public class AddTranslationWithoutContentDialog extends BaseDialogBean
{
this.multilingualContentService = multilingualContentService;
}
private MultilingualContentService getMultilingualContentService()
{
if (multilingualContentService == null)
{
multilingualContentService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getMultilingualContentService();
}
return multilingualContentService;
}
/**
* @return the author
@@ -202,4 +217,5 @@ public class AddTranslationWithoutContentDialog extends BaseDialogBean
{
this.showOtherProperties = showOtherProperties;
}
}