diff --git a/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/ui/AgendaPropertiesStep.java b/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/ui/AgendaPropertiesStep.java index 406cbb667..ecd6af9dd 100755 --- a/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/ui/AgendaPropertiesStep.java +++ b/ccm-cms-types-agenda/src/com/arsdigita/cms/contenttypes/ui/AgendaPropertiesStep.java @@ -34,7 +34,8 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; // replaced by AgendaGlobalizationUtil // import com.arsdigita.cms.util.GlobalizationUtil; -import com.arsdigita.dispatcher.DispatcherHelper; + +import com.arsdigita.globalization.GlobalizationHelper; import java.text.DateFormat; @@ -92,7 +93,7 @@ public class AgendaPropertiesStep extends SimpleEditStep { PageState state) { ContentPage page = (ContentPage) item; if(page.getLaunchDate() != null) { - return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()) + return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale()) .format(page.getLaunchDate()); } else { return (String)AgendaGlobalizationUtil.globalize("cms.ui.unknown").localize(); @@ -121,7 +122,7 @@ public class AgendaPropertiesStep extends SimpleEditStep { PageState state) { Agenda agenda = (Agenda) item; if(agenda.getCreationDate() != null) { - return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()) + return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale()) .format(agenda.getCreationDate()); } else { return (String)AgendaGlobalizationUtil.globalize("cms.ui.unknown").localize(); diff --git a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java index f3d5ecd24..7820aa774 100755 --- a/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java +++ b/ccm-cms-types-event/src/com/arsdigita/cms/contenttypes/ui/EventPropertiesStep.java @@ -31,7 +31,7 @@ import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.contenttypes.util.EventGlobalizationUtil; -import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.globalization.GlobalizationHelper; import java.text.DateFormat; import java.util.Calendar; @@ -91,7 +91,7 @@ public class EventPropertiesStep extends SimpleEditStep { PageState state) { ContentPage page = (ContentPage) item; if (page.getLaunchDate() != null) { - return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()).format(page.getLaunchDate()); + return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale()).format(page.getLaunchDate()); } else { return (String) EventGlobalizationUtil.globalize("cms.ui.unknown").localize(); } @@ -109,11 +109,11 @@ public class EventPropertiesStep extends SimpleEditStep { if (e.getStartDate() != null) { if (e.getStartTime() == null) { - return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()).format(e.getStartDate()); + return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale()).format(e.getStartDate()); } else { int timezoneOffset = Calendar.getInstance().get(Calendar.ZONE_OFFSET) + Calendar.getInstance().get(Calendar.DST_OFFSET) / (60 * 1000); Date startDateTime = new Date(e.getStartDate().getTime() + e.getStartTime().getTime() + timezoneOffset); - return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT, DispatcherHelper.getNegotiatedLocale()).format(startDateTime); + return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT, GlobalizationHelper.getNegotiatedLocale()).format(startDateTime); } @@ -133,11 +133,11 @@ public class EventPropertiesStep extends SimpleEditStep { if (e.getEndDate() != null) { if (e.getEndTime() == null) { - return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()).format(e.getEndDate()); + return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale()).format(e.getEndDate()); } else { int timezoneOffset = Calendar.getInstance().get(Calendar.ZONE_OFFSET) + Calendar.getInstance().get(Calendar.DST_OFFSET) / (60 * 1000); Date endDateTime = new Date(e.getEndDate().getTime() + e.getEndTime().getTime() + timezoneOffset); - return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT, DispatcherHelper.getNegotiatedLocale()).format(endDateTime); + return DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.SHORT, GlobalizationHelper.getNegotiatedLocale()).format(endDateTime); } diff --git a/ccm-cms-types-image/src/com/arsdigita/cms/contenttypes/ui/ImagePropertiesStep.java b/ccm-cms-types-image/src/com/arsdigita/cms/contenttypes/ui/ImagePropertiesStep.java index 15a916706..df363dcda 100755 --- a/ccm-cms-types-image/src/com/arsdigita/cms/contenttypes/ui/ImagePropertiesStep.java +++ b/ccm-cms-types-image/src/com/arsdigita/cms/contenttypes/ui/ImagePropertiesStep.java @@ -48,7 +48,7 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; -import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.globalization.GlobalizationHelper; import java.io.File; import java.io.IOException; import java.text.DateFormat; @@ -158,7 +158,7 @@ public class ImagePropertiesStep extends SimpleEditStep { if (image.getSkipDay().booleanValue() == true || image.getSkipMonth().booleanValue() == true) { String month = ""; if (image.getSkipMonth().booleanValue() == false) { - Locale locale = DispatcherHelper.getNegotiatedLocale(); + Locale locale = GlobalizationHelper.getNegotiatedLocale(); if (locale != null) { diff --git a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java index 4c4998b08..14225aee9 100755 --- a/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java +++ b/ccm-cms-types-mparticle/src/com/arsdigita/cms/contenttypes/ui/mparticle/ArticleSectionPanel.java @@ -33,7 +33,7 @@ import com.arsdigita.cms.contenttypes.ArticleSection; import com.arsdigita.cms.contenttypes.ArticleSectionCollection; import com.arsdigita.cms.contenttypes.MultiPartArticle; import com.arsdigita.cms.dispatcher.XMLGenerator; -import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.globalization.GlobalizationHelper; import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.xml.Element; @@ -141,7 +141,7 @@ public class ArticleSectionPanel extends SimpleComponent implements bundle = (ContentBundle) item; - resolved = bundle.getInstance(DispatcherHelper.getNegotiatedLocale().getLanguage()); + resolved = bundle.getInstance(GlobalizationHelper.getNegotiatedLocale().getLanguage()); if (resolved == null) { resolved = bundle.getPrimaryInstance(); } diff --git a/ccm-cms-types-newsitem/src/com/arsdigita/cms/contenttypes/ui/NewsItemPropertiesStep.java b/ccm-cms-types-newsitem/src/com/arsdigita/cms/contenttypes/ui/NewsItemPropertiesStep.java index 4207db322..211d0f05f 100755 --- a/ccm-cms-types-newsitem/src/com/arsdigita/cms/contenttypes/ui/NewsItemPropertiesStep.java +++ b/ccm-cms-types-newsitem/src/com/arsdigita/cms/contenttypes/ui/NewsItemPropertiesStep.java @@ -31,7 +31,8 @@ import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.contenttypes.util.NewsItemGlobalizationUtil; -import com.arsdigita.dispatcher.DispatcherHelper; + +import com.arsdigita.globalization.GlobalizationHelper; import java.text.DateFormat; @@ -87,7 +88,7 @@ public class NewsItemPropertiesStep extends SimpleEditStep { PageState state) { ContentPage page = (ContentPage) item; if (page.getLaunchDate() != null) { - return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()).format(page.getLaunchDate()); + return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale()).format(page.getLaunchDate()); } else { return (String) NewsItemGlobalizationUtil.globalize("cms.ui.unknown").localize(); } @@ -123,7 +124,7 @@ public class NewsItemPropertiesStep extends SimpleEditStep { PageState state) { NewsItem pr = (NewsItem) item; if (pr.getNewsDate() != null) { - return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()).format(pr.getNewsDate()); + return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale()).format(pr.getNewsDate()); } else { return (String) NewsItemGlobalizationUtil.globalize("cms.ui.unknown").localize(); } diff --git a/ccm-core/src/com/arsdigita/globalization/GlobalizationHelper.java b/ccm-core/src/com/arsdigita/globalization/GlobalizationHelper.java index e3bb9bf6e..d8e3ef797 100644 --- a/ccm-core/src/com/arsdigita/globalization/GlobalizationHelper.java +++ b/ccm-core/src/com/arsdigita/globalization/GlobalizationHelper.java @@ -18,6 +18,8 @@ import java.util.StringTokenizer; */ public class GlobalizationHelper { + private static final String LANG_PARAM = "lang"; + // Don't instantiate private GlobalizationHelper() { } @@ -50,25 +52,16 @@ public class GlobalizationHelper { preferedLocale = selectedLocale; } else { - // - String lang = request.getParameter("lang"); + locales = request.getLocales(); - if (lang != null && kernelConfig.hasLanguage(lang)) { + // For everey element in the enumerator + while (locales.hasMoreElements()) { - preferedLocale = new Locale(lang); - } else { - - locales = request.getLocales(); - - // For everey element in the enumerator - while (locales.hasMoreElements()) { - - // Test if the current locale is listed in the supported locales list - java.util.Locale curLocale = (Locale) locales.nextElement(); - if (kernelConfig.hasLanguage(curLocale.getLanguage())) { - preferedLocale = curLocale; - break; - } + // Test if the current locale is listed in the supported locales list + java.util.Locale curLocale = (Locale) locales.nextElement(); + if (kernelConfig.hasLanguage(curLocale.getLanguage())) { + preferedLocale = curLocale; + break; } } } @@ -98,7 +91,7 @@ public class GlobalizationHelper { */ public static Locale getSelectedLocale(ServletRequest request) { // ServletRequest request = ((ServletRequest) DispatcherHelper.getRequest()); - String paramValue = request.getParameter("selLang"); + String paramValue = request.getParameter(LANG_PARAM); java.util.Locale selectedLocale = null; if (paramValue != null) { diff --git a/ccm-core/src/com/arsdigita/xml/Element.java b/ccm-core/src/com/arsdigita/xml/Element.java index d51f51559..013559a9d 100755 --- a/ccm-core/src/com/arsdigita/xml/Element.java +++ b/ccm-core/src/com/arsdigita/xml/Element.java @@ -304,7 +304,7 @@ public class Element { * of the current element. */ public String getText() { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); org.w3c.dom.NodeList nl = m_element.getChildNodes(); @@ -335,7 +335,7 @@ public class Element { } public String getCDATASection() { - StringBuffer result = new StringBuffer(); + StringBuilder result = new StringBuilder(); org.w3c.dom.NodeList nl = m_element.getChildNodes(); @@ -529,7 +529,7 @@ public class Element { // will return the same XMLHash List sortedList = getXMLFragments(); Collections.sort(sortedList); - StringBuffer xml = new StringBuffer(); + StringBuilder xml = new StringBuilder(); Iterator xmlFragments = sortedList.iterator(); while (xmlFragments.hasNext()) { xml.append(xmlFragments.next()); diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/DataCollectionRenderer.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/DataCollectionRenderer.java index 243b788f6..a3ecd79eb 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/DataCollectionRenderer.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/DataCollectionRenderer.java @@ -295,7 +295,7 @@ public class DataCollectionRenderer extends LockableImpl { // Quasimodo: BEGIN // Add attributes for date and time - Locale negLocale = com.arsdigita.dispatcher.DispatcherHelper. + Locale negLocale = com.arsdigita.globalization.GlobalizationHelper. getNegotiatedLocale(); DateFormat dateFormatter = DateFormat.getDateInstance( DateFormat.MEDIUM, negLocale); diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java index 9146fe04e..52c3ca5a0 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/portlet/ObjectListPortlet.java @@ -108,6 +108,7 @@ public class ObjectListPortlet extends Portlet { return (DataCollectionPropertyRenderer) entry[2]; } + @Override public void initialize() { super.initialize(); @@ -159,7 +160,7 @@ public class ObjectListPortlet extends Portlet { } public void setCheckPermissions(boolean check) { - set(CHECK_PERMISSIONS, new Boolean(check)); + set(CHECK_PERMISSIONS, Boolean.valueOf(check)); } public boolean isCheckingPermissions() { @@ -176,7 +177,7 @@ public class ObjectListPortlet extends Portlet { } public void setDescendCategories(boolean descend) { - set(DESCEND_CATEGORIES, new Boolean(descend)); + set(DESCEND_CATEGORIES, Boolean.valueOf(descend)); } public boolean isDescendingCategories() { @@ -184,7 +185,7 @@ public class ObjectListPortlet extends Portlet { } public void setExcludeIndexObjects(boolean exclude) { - set(EXCLUDE_INDEX_OBJECTS, new Boolean(exclude)); + set(EXCLUDE_INDEX_OBJECTS, Boolean.valueOf(exclude)); } public boolean isExludingIndexObjects() { @@ -192,7 +193,7 @@ public class ObjectListPortlet extends Portlet { } public void setProperties( Object[] properties ) { - StringBuffer buf = new StringBuffer(); + StringBuilder buf = new StringBuilder(); if( null != properties ) { for( int i = 0; i < properties.length; i++ ) { @@ -209,7 +210,9 @@ public class ObjectListPortlet extends Portlet { public String[] getProperties() { String properties = (String) get( PROPERTIES ); - if( null == properties ) return new String[] { }; + if( null == properties ) { + return new String[] { }; + } StringTokenizer tok = new StringTokenizer( properties, "," ); String[] result = new String[ tok.countTokens() ]; @@ -254,6 +257,7 @@ public class ObjectListPortlet extends Portlet { } + @Override protected AbstractPortletRenderer doGetPortletRenderer() { return new ObjectListPortletRenderer(this); } @@ -266,14 +270,17 @@ public class ObjectListPortlet extends Portlet { m_portlet = portlet; } + @Override protected ACSObject loadObject() { return null; } + @Override protected Category loadCategory() { return m_portlet.getFilterCategory(); } + @Override protected Category[] loadCategoryPath() { Category cat = getCategory(); if (cat == null) { @@ -289,6 +296,7 @@ public class ObjectListPortlet extends Portlet { return (Category[])path.toArray(new Category[path.size()]); } + @Override protected Category loadRootCategory() { Category[] path = getCategoryPath(); return path.length == 0 ? null : path[0]; diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/AbstractObjectList.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/AbstractObjectList.java index b21e77d40..203ca2384 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/AbstractObjectList.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/AbstractObjectList.java @@ -96,7 +96,7 @@ public abstract class AbstractObjectList // Quasimodo: Begin // Limit list to objects in the negotiated language if (objects != null && objects.size() > 0) { - objects.addEqualsFilter("language", com.arsdigita.dispatcher.DispatcherHelper.getNegotiatedLocale().getLanguage()); + objects.addEqualsFilter("language", com.arsdigita.globalization.GlobalizationHelper.getNegotiatedLocale().getLanguage()); } // Quasimodo: End diff --git a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/GreetingItem.java b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/GreetingItem.java index 8c4dcfaa2..906b1667b 100755 --- a/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/GreetingItem.java +++ b/ccm-ldn-navigation/src/com/arsdigita/london/navigation/ui/GreetingItem.java @@ -32,7 +32,7 @@ import com.arsdigita.cms.ContentItemXMLRenderer; import com.arsdigita.cms.ExtraXMLGenerator; import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.dispatcher.SimpleXMLGenerator; -import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.globalization.GlobalizationHelper; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.Party; import com.arsdigita.kernel.permissions.PermissionDescriptor; @@ -105,7 +105,7 @@ public class GreetingItem extends AbstractComponent { * language version. */ //ContentItem baseItem = bundle.getPrimaryInstance(); - ContentItem baseItem = bundle.getInstance(DispatcherHelper. + ContentItem baseItem = bundle.getInstance(GlobalizationHelper. getNegotiatedLocale().getLanguage()); // If there is no matching language version for this content item if (baseItem == null) { diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciDepartmentAddForm.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciDepartmentAddForm.java index 86a689f12..8fcc5d91b 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciDepartmentAddForm.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciDepartmentAddForm.java @@ -23,7 +23,7 @@ import com.arsdigita.cms.contenttypes.SciMemberSciDepartmentsCollection; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.ui.ItemSearchWidget; import com.arsdigita.cms.ui.authoring.BasicItemForm; -import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.globalization.GlobalizationHelper; /** * @@ -71,7 +71,7 @@ public class SciMemberSciDepartmentAddForm globalize("cms.ui.select_one").localize()))); RelationAttributeCollection roles = new RelationAttributeCollection( "SciDepartmentRole"); - roles.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). + roles.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale(). getLanguage()); while (roles.next()) { RelationAttribute role; @@ -93,7 +93,7 @@ public class SciMemberSciDepartmentAddForm RelationAttributeCollection statusColl = new RelationAttributeCollection( "GenericOrganizationalUnitMemberStatus"); - statusColl.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). + statusColl.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale(). getLanguage()); while (statusColl.next()) { RelationAttribute status; diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciOrganizationAddForm.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciOrganizationAddForm.java index 260a86725..5c607021f 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciOrganizationAddForm.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciOrganizationAddForm.java @@ -23,7 +23,7 @@ import com.arsdigita.cms.contenttypes.SciOrganization; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.ui.ItemSearchWidget; import com.arsdigita.cms.ui.authoring.BasicItemForm; -import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.globalization.GlobalizationHelper; /** * @@ -71,7 +71,7 @@ public class SciMemberSciOrganizationAddForm globalize("cms.ui.select_one").localize()))); RelationAttributeCollection roles = new RelationAttributeCollection( "SciOrganizationRole"); - roles.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). + roles.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale(). getLanguage()); while (roles.next()) { RelationAttribute role; @@ -93,7 +93,7 @@ public class SciMemberSciOrganizationAddForm RelationAttributeCollection statusColl = new RelationAttributeCollection( "GenericOrganizationalUnitMemberStatus"); - statusColl.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). + statusColl.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale(). getLanguage()); while (statusColl.next()) { RelationAttribute status; diff --git a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciProjectAddForm.java b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciProjectAddForm.java index 136cb29cf..355853e8f 100644 --- a/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciProjectAddForm.java +++ b/ccm-sci-types-organization/src/com/arsdigita/cms/contenttypes/ui/SciMemberSciProjectAddForm.java @@ -23,7 +23,7 @@ import com.arsdigita.cms.contenttypes.SciMemberSciProjectsCollection; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.ui.ItemSearchWidget; import com.arsdigita.cms.ui.authoring.BasicItemForm; -import com.arsdigita.dispatcher.DispatcherHelper; +import com.arsdigita.globalization.GlobalizationHelper; /** * @@ -71,7 +71,7 @@ public class SciMemberSciProjectAddForm globalize("cms.ui.select_one").localize()))); RelationAttributeCollection roles = new RelationAttributeCollection( "SciProjectRole"); - roles.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). + roles.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale(). getLanguage()); while (roles.next()) { RelationAttribute role; @@ -93,7 +93,7 @@ public class SciMemberSciProjectAddForm RelationAttributeCollection statusColl = new RelationAttributeCollection( "GenericOrganizationalUnitMemberStatus"); - statusColl.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). + statusColl.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale(). getLanguage()); while (statusColl.next()) { RelationAttribute status;