Diverse Änderungen - von allem etwas.

git-svn-id: https://svn.libreccm.org/ccm/trunk@1114 8810af33-2d31-482b-a856-94f89814c4df
master
quasi 2011-09-11 10:02:25 +00:00
parent f4e0632ce2
commit f5ab0bcfb6
14 changed files with 58 additions and 55 deletions

View File

@ -34,7 +34,8 @@ import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
// replaced by AgendaGlobalizationUtil // replaced by AgendaGlobalizationUtil
// import com.arsdigita.cms.util.GlobalizationUtil; // import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.globalization.GlobalizationHelper;
import java.text.DateFormat; import java.text.DateFormat;
@ -92,7 +93,7 @@ public class AgendaPropertiesStep extends SimpleEditStep {
PageState state) { PageState state) {
ContentPage page = (ContentPage) item; ContentPage page = (ContentPage) item;
if(page.getLaunchDate() != null) { if(page.getLaunchDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()) return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale())
.format(page.getLaunchDate()); .format(page.getLaunchDate());
} else { } else {
return (String)AgendaGlobalizationUtil.globalize("cms.ui.unknown").localize(); return (String)AgendaGlobalizationUtil.globalize("cms.ui.unknown").localize();
@ -121,7 +122,7 @@ public class AgendaPropertiesStep extends SimpleEditStep {
PageState state) { PageState state) {
Agenda agenda = (Agenda) item; Agenda agenda = (Agenda) item;
if(agenda.getCreationDate() != null) { if(agenda.getCreationDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG, DispatcherHelper.getNegotiatedLocale()) return DateFormat.getDateInstance(DateFormat.LONG, GlobalizationHelper.getNegotiatedLocale())
.format(agenda.getCreationDate()); .format(agenda.getCreationDate());
} else { } else {
return (String)AgendaGlobalizationUtil.globalize("cms.ui.unknown").localize(); return (String)AgendaGlobalizationUtil.globalize("cms.ui.unknown").localize();

View File

@ -31,7 +31,7 @@ import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.cms.contenttypes.util.EventGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.EventGlobalizationUtil;
import com.arsdigita.dispatcher.DispatcherHelper; import com.arsdigita.globalization.GlobalizationHelper;
import java.text.DateFormat; import java.text.DateFormat;
import java.util.Calendar; import java.util.Calendar;
@ -91,7 +91,7 @@ public class EventPropertiesStep extends SimpleEditStep {
PageState state) { PageState state) {
ContentPage page = (ContentPage) item; ContentPage page = (ContentPage) item;
if (page.getLaunchDate() != null) { 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 { } else {
return (String) EventGlobalizationUtil.globalize("cms.ui.unknown").localize(); return (String) EventGlobalizationUtil.globalize("cms.ui.unknown").localize();
} }
@ -109,11 +109,11 @@ public class EventPropertiesStep extends SimpleEditStep {
if (e.getStartDate() != null) { if (e.getStartDate() != null) {
if (e.getStartTime() == 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 { } else {
int timezoneOffset = Calendar.getInstance().get(Calendar.ZONE_OFFSET) + Calendar.getInstance().get(Calendar.DST_OFFSET) / (60 * 1000); 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); 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.getEndDate() != null) {
if (e.getEndTime() == 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 { } else {
int timezoneOffset = Calendar.getInstance().get(Calendar.ZONE_OFFSET) + Calendar.getInstance().get(Calendar.DST_OFFSET) / (60 * 1000); 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); 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);
} }

View File

@ -48,7 +48,7 @@ import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.dispatcher.DispatcherHelper; import com.arsdigita.globalization.GlobalizationHelper;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
import java.text.DateFormat; import java.text.DateFormat;
@ -158,7 +158,7 @@ public class ImagePropertiesStep extends SimpleEditStep {
if (image.getSkipDay().booleanValue() == true || image.getSkipMonth().booleanValue() == true) { if (image.getSkipDay().booleanValue() == true || image.getSkipMonth().booleanValue() == true) {
String month = ""; String month = "";
if (image.getSkipMonth().booleanValue() == false) { if (image.getSkipMonth().booleanValue() == false) {
Locale locale = DispatcherHelper.getNegotiatedLocale(); Locale locale = GlobalizationHelper.getNegotiatedLocale();
if (locale != null) { if (locale != null) {

View File

@ -33,7 +33,7 @@ import com.arsdigita.cms.contenttypes.ArticleSection;
import com.arsdigita.cms.contenttypes.ArticleSectionCollection; import com.arsdigita.cms.contenttypes.ArticleSectionCollection;
import com.arsdigita.cms.contenttypes.MultiPartArticle; import com.arsdigita.cms.contenttypes.MultiPartArticle;
import com.arsdigita.cms.dispatcher.XMLGenerator; import com.arsdigita.cms.dispatcher.XMLGenerator;
import com.arsdigita.dispatcher.DispatcherHelper; import com.arsdigita.globalization.GlobalizationHelper;
import com.arsdigita.util.UncheckedWrapperException; import com.arsdigita.util.UncheckedWrapperException;
import com.arsdigita.xml.Element; import com.arsdigita.xml.Element;
@ -141,7 +141,7 @@ public class ArticleSectionPanel extends SimpleComponent implements
bundle = (ContentBundle) item; bundle = (ContentBundle) item;
resolved = bundle.getInstance(DispatcherHelper.getNegotiatedLocale().getLanguage()); resolved = bundle.getInstance(GlobalizationHelper.getNegotiatedLocale().getLanguage());
if (resolved == null) { if (resolved == null) {
resolved = bundle.getPrimaryInstance(); resolved = bundle.getPrimaryInstance();
} }

View File

@ -31,7 +31,8 @@ import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.cms.contenttypes.util.NewsItemGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.NewsItemGlobalizationUtil;
import com.arsdigita.dispatcher.DispatcherHelper;
import com.arsdigita.globalization.GlobalizationHelper;
import java.text.DateFormat; import java.text.DateFormat;
@ -87,7 +88,7 @@ public class NewsItemPropertiesStep extends SimpleEditStep {
PageState state) { PageState state) {
ContentPage page = (ContentPage) item; ContentPage page = (ContentPage) item;
if (page.getLaunchDate() != null) { 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 { } else {
return (String) NewsItemGlobalizationUtil.globalize("cms.ui.unknown").localize(); return (String) NewsItemGlobalizationUtil.globalize("cms.ui.unknown").localize();
} }
@ -123,7 +124,7 @@ public class NewsItemPropertiesStep extends SimpleEditStep {
PageState state) { PageState state) {
NewsItem pr = (NewsItem) item; NewsItem pr = (NewsItem) item;
if (pr.getNewsDate() != null) { 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 { } else {
return (String) NewsItemGlobalizationUtil.globalize("cms.ui.unknown").localize(); return (String) NewsItemGlobalizationUtil.globalize("cms.ui.unknown").localize();
} }

View File

@ -18,6 +18,8 @@ import java.util.StringTokenizer;
*/ */
public class GlobalizationHelper { public class GlobalizationHelper {
private static final String LANG_PARAM = "lang";
// Don't instantiate // Don't instantiate
private GlobalizationHelper() { private GlobalizationHelper() {
} }
@ -50,25 +52,16 @@ public class GlobalizationHelper {
preferedLocale = selectedLocale; preferedLocale = selectedLocale;
} else { } else {
// locales = request.getLocales();
String lang = request.getParameter("lang");
if (lang != null && kernelConfig.hasLanguage(lang)) { // For everey element in the enumerator
while (locales.hasMoreElements()) {
preferedLocale = new Locale(lang); // Test if the current locale is listed in the supported locales list
} else { java.util.Locale curLocale = (Locale) locales.nextElement();
if (kernelConfig.hasLanguage(curLocale.getLanguage())) {
locales = request.getLocales(); preferedLocale = curLocale;
break;
// 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;
}
} }
} }
} }
@ -98,7 +91,7 @@ public class GlobalizationHelper {
*/ */
public static Locale getSelectedLocale(ServletRequest request) { public static Locale getSelectedLocale(ServletRequest request) {
// ServletRequest request = ((ServletRequest) DispatcherHelper.getRequest()); // ServletRequest request = ((ServletRequest) DispatcherHelper.getRequest());
String paramValue = request.getParameter("selLang"); String paramValue = request.getParameter(LANG_PARAM);
java.util.Locale selectedLocale = null; java.util.Locale selectedLocale = null;
if (paramValue != null) { if (paramValue != null) {

View File

@ -304,7 +304,7 @@ public class Element {
* of the current element. * of the current element.
*/ */
public String getText() { public String getText() {
StringBuffer result = new StringBuffer(); StringBuilder result = new StringBuilder();
org.w3c.dom.NodeList nl = m_element.getChildNodes(); org.w3c.dom.NodeList nl = m_element.getChildNodes();
@ -335,7 +335,7 @@ public class Element {
} }
public String getCDATASection() { public String getCDATASection() {
StringBuffer result = new StringBuffer(); StringBuilder result = new StringBuilder();
org.w3c.dom.NodeList nl = m_element.getChildNodes(); org.w3c.dom.NodeList nl = m_element.getChildNodes();
@ -529,7 +529,7 @@ public class Element {
// will return the same XMLHash // will return the same XMLHash
List sortedList = getXMLFragments(); List sortedList = getXMLFragments();
Collections.sort(sortedList); Collections.sort(sortedList);
StringBuffer xml = new StringBuffer(); StringBuilder xml = new StringBuilder();
Iterator xmlFragments = sortedList.iterator(); Iterator xmlFragments = sortedList.iterator();
while (xmlFragments.hasNext()) { while (xmlFragments.hasNext()) {
xml.append(xmlFragments.next()); xml.append(xmlFragments.next());

View File

@ -295,7 +295,7 @@ public class DataCollectionRenderer extends LockableImpl {
// Quasimodo: BEGIN // Quasimodo: BEGIN
// Add attributes for date and time // Add attributes for date and time
Locale negLocale = com.arsdigita.dispatcher.DispatcherHelper. Locale negLocale = com.arsdigita.globalization.GlobalizationHelper.
getNegotiatedLocale(); getNegotiatedLocale();
DateFormat dateFormatter = DateFormat.getDateInstance( DateFormat dateFormatter = DateFormat.getDateInstance(
DateFormat.MEDIUM, negLocale); DateFormat.MEDIUM, negLocale);

View File

@ -108,6 +108,7 @@ public class ObjectListPortlet extends Portlet {
return (DataCollectionPropertyRenderer) entry[2]; return (DataCollectionPropertyRenderer) entry[2];
} }
@Override
public void initialize() { public void initialize() {
super.initialize(); super.initialize();
@ -159,7 +160,7 @@ public class ObjectListPortlet extends Portlet {
} }
public void setCheckPermissions(boolean check) { public void setCheckPermissions(boolean check) {
set(CHECK_PERMISSIONS, new Boolean(check)); set(CHECK_PERMISSIONS, Boolean.valueOf(check));
} }
public boolean isCheckingPermissions() { public boolean isCheckingPermissions() {
@ -176,7 +177,7 @@ public class ObjectListPortlet extends Portlet {
} }
public void setDescendCategories(boolean descend) { public void setDescendCategories(boolean descend) {
set(DESCEND_CATEGORIES, new Boolean(descend)); set(DESCEND_CATEGORIES, Boolean.valueOf(descend));
} }
public boolean isDescendingCategories() { public boolean isDescendingCategories() {
@ -184,7 +185,7 @@ public class ObjectListPortlet extends Portlet {
} }
public void setExcludeIndexObjects(boolean exclude) { public void setExcludeIndexObjects(boolean exclude) {
set(EXCLUDE_INDEX_OBJECTS, new Boolean(exclude)); set(EXCLUDE_INDEX_OBJECTS, Boolean.valueOf(exclude));
} }
public boolean isExludingIndexObjects() { public boolean isExludingIndexObjects() {
@ -192,7 +193,7 @@ public class ObjectListPortlet extends Portlet {
} }
public void setProperties( Object[] properties ) { public void setProperties( Object[] properties ) {
StringBuffer buf = new StringBuffer(); StringBuilder buf = new StringBuilder();
if( null != properties ) { if( null != properties ) {
for( int i = 0; i < properties.length; i++ ) { for( int i = 0; i < properties.length; i++ ) {
@ -209,7 +210,9 @@ public class ObjectListPortlet extends Portlet {
public String[] getProperties() { public String[] getProperties() {
String properties = (String) get( PROPERTIES ); String properties = (String) get( PROPERTIES );
if( null == properties ) return new String[] { }; if( null == properties ) {
return new String[] { };
}
StringTokenizer tok = new StringTokenizer( properties, "," ); StringTokenizer tok = new StringTokenizer( properties, "," );
String[] result = new String[ tok.countTokens() ]; String[] result = new String[ tok.countTokens() ];
@ -254,6 +257,7 @@ public class ObjectListPortlet extends Portlet {
} }
@Override
protected AbstractPortletRenderer doGetPortletRenderer() { protected AbstractPortletRenderer doGetPortletRenderer() {
return new ObjectListPortletRenderer(this); return new ObjectListPortletRenderer(this);
} }
@ -266,14 +270,17 @@ public class ObjectListPortlet extends Portlet {
m_portlet = portlet; m_portlet = portlet;
} }
@Override
protected ACSObject loadObject() { protected ACSObject loadObject() {
return null; return null;
} }
@Override
protected Category loadCategory() { protected Category loadCategory() {
return m_portlet.getFilterCategory(); return m_portlet.getFilterCategory();
} }
@Override
protected Category[] loadCategoryPath() { protected Category[] loadCategoryPath() {
Category cat = getCategory(); Category cat = getCategory();
if (cat == null) { if (cat == null) {
@ -289,6 +296,7 @@ public class ObjectListPortlet extends Portlet {
return (Category[])path.toArray(new Category[path.size()]); return (Category[])path.toArray(new Category[path.size()]);
} }
@Override
protected Category loadRootCategory() { protected Category loadRootCategory() {
Category[] path = getCategoryPath(); Category[] path = getCategoryPath();
return path.length == 0 ? null : path[0]; return path.length == 0 ? null : path[0];

View File

@ -96,7 +96,7 @@ public abstract class AbstractObjectList
// Quasimodo: Begin // Quasimodo: Begin
// Limit list to objects in the negotiated language // Limit list to objects in the negotiated language
if (objects != null && objects.size() > 0) { 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 // Quasimodo: End

View File

@ -32,7 +32,7 @@ import com.arsdigita.cms.ContentItemXMLRenderer;
import com.arsdigita.cms.ExtraXMLGenerator; import com.arsdigita.cms.ExtraXMLGenerator;
import com.arsdigita.cms.SecurityManager; import com.arsdigita.cms.SecurityManager;
import com.arsdigita.cms.dispatcher.SimpleXMLGenerator; 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.Kernel;
import com.arsdigita.kernel.Party; import com.arsdigita.kernel.Party;
import com.arsdigita.kernel.permissions.PermissionDescriptor; import com.arsdigita.kernel.permissions.PermissionDescriptor;
@ -105,7 +105,7 @@ public class GreetingItem extends AbstractComponent {
* language version. * language version.
*/ */
//ContentItem baseItem = bundle.getPrimaryInstance(); //ContentItem baseItem = bundle.getPrimaryInstance();
ContentItem baseItem = bundle.getInstance(DispatcherHelper. ContentItem baseItem = bundle.getInstance(GlobalizationHelper.
getNegotiatedLocale().getLanguage()); getNegotiatedLocale().getLanguage());
// If there is no matching language version for this content item // If there is no matching language version for this content item
if (baseItem == null) { if (baseItem == null) {

View File

@ -23,7 +23,7 @@ import com.arsdigita.cms.contenttypes.SciMemberSciDepartmentsCollection;
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
import com.arsdigita.cms.ui.ItemSearchWidget; import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm; 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()))); globalize("cms.ui.select_one").localize())));
RelationAttributeCollection roles = new RelationAttributeCollection( RelationAttributeCollection roles = new RelationAttributeCollection(
"SciDepartmentRole"); "SciDepartmentRole");
roles.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). roles.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
getLanguage()); getLanguage());
while (roles.next()) { while (roles.next()) {
RelationAttribute role; RelationAttribute role;
@ -93,7 +93,7 @@ public class SciMemberSciDepartmentAddForm
RelationAttributeCollection statusColl = RelationAttributeCollection statusColl =
new RelationAttributeCollection( new RelationAttributeCollection(
"GenericOrganizationalUnitMemberStatus"); "GenericOrganizationalUnitMemberStatus");
statusColl.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). statusColl.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
getLanguage()); getLanguage());
while (statusColl.next()) { while (statusColl.next()) {
RelationAttribute status; RelationAttribute status;

View File

@ -23,7 +23,7 @@ import com.arsdigita.cms.contenttypes.SciOrganization;
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
import com.arsdigita.cms.ui.ItemSearchWidget; import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm; 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()))); globalize("cms.ui.select_one").localize())));
RelationAttributeCollection roles = new RelationAttributeCollection( RelationAttributeCollection roles = new RelationAttributeCollection(
"SciOrganizationRole"); "SciOrganizationRole");
roles.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). roles.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
getLanguage()); getLanguage());
while (roles.next()) { while (roles.next()) {
RelationAttribute role; RelationAttribute role;
@ -93,7 +93,7 @@ public class SciMemberSciOrganizationAddForm
RelationAttributeCollection statusColl = RelationAttributeCollection statusColl =
new RelationAttributeCollection( new RelationAttributeCollection(
"GenericOrganizationalUnitMemberStatus"); "GenericOrganizationalUnitMemberStatus");
statusColl.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). statusColl.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
getLanguage()); getLanguage());
while (statusColl.next()) { while (statusColl.next()) {
RelationAttribute status; RelationAttribute status;

View File

@ -23,7 +23,7 @@ import com.arsdigita.cms.contenttypes.SciMemberSciProjectsCollection;
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
import com.arsdigita.cms.ui.ItemSearchWidget; import com.arsdigita.cms.ui.ItemSearchWidget;
import com.arsdigita.cms.ui.authoring.BasicItemForm; 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()))); globalize("cms.ui.select_one").localize())));
RelationAttributeCollection roles = new RelationAttributeCollection( RelationAttributeCollection roles = new RelationAttributeCollection(
"SciProjectRole"); "SciProjectRole");
roles.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). roles.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
getLanguage()); getLanguage());
while (roles.next()) { while (roles.next()) {
RelationAttribute role; RelationAttribute role;
@ -93,7 +93,7 @@ public class SciMemberSciProjectAddForm
RelationAttributeCollection statusColl = RelationAttributeCollection statusColl =
new RelationAttributeCollection( new RelationAttributeCollection(
"GenericOrganizationalUnitMemberStatus"); "GenericOrganizationalUnitMemberStatus");
statusColl.addLanguageFilter(DispatcherHelper.getNegotiatedLocale(). statusColl.addLanguageFilter(GlobalizationHelper.getNegotiatedLocale().
getLanguage()); getLanguage());
while (statusColl.next()) { while (statusColl.next()) {
RelationAttribute status; RelationAttribute status;