Weitere Verbesserungen Multilanguage Support.

git-svn-id: https://svn.libreccm.org/ccm/trunk@2206 8810af33-2d31-482b-a856-94f89814c4df
master
pb 2013-06-14 07:34:04 +00:00
parent 09ee19c021
commit 972b8dd775
20 changed files with 430 additions and 280 deletions

View File

@ -52,6 +52,10 @@ import java.util.Date;
**/ **/
public class Agenda extends GenericArticle { public class Agenda extends GenericArticle {
/** Data object type for this domain object (for CMS compatibility) */
private static final Logger s_log = Logger.getLogger(Logger.class);
// PDL stuff *************************************************************
/** PDL property name for summary */ /** PDL property name for summary */
public static final String SUMMARY = "summary"; public static final String SUMMARY = "summary";
/** PDL property name for agenda date */ /** PDL property name for agenda date */
@ -67,9 +71,8 @@ public class Agenda extends GenericArticle {
/** PDL property name for creation date */ /** PDL property name for creation date */
public static final String CREATION_DATE = "creationDate"; public static final String CREATION_DATE = "creationDate";
/** Data object type for this domain object */ /** Data object type for this domain object */
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.Agenda"; public static final String BASE_DATA_OBJECT_TYPE =
/** Data object type for this domain object (for CMS compatibility) */ "com.arsdigita.cms.contenttypes.Agenda";
private static final Logger s_log = Logger.getLogger(Logger.class);
/** /**
* Default constructor. This creates a new (empty) Agenda. * Default constructor. This creates a new (empty) Agenda.

View File

@ -21,10 +21,11 @@ package com.arsdigita.cms.contenttypes.ui;
import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Component;
import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.PageState;
import com.arsdigita.cms.contenttypes.util.AgendaGlobalizationUtil;
import com.arsdigita.cms.contenttypes.Agenda;
import com.arsdigita.cms.ContentPage; import com.arsdigita.cms.ContentPage;
import com.arsdigita.cms.ContentSection; import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.cms.contenttypes.Agenda;
import com.arsdigita.cms.contenttypes.util.AgendaGlobalizationUtil;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.domain.DomainObject; import com.arsdigita.domain.DomainObject;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
@ -36,6 +37,7 @@ import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
import com.arsdigita.globalization.GlobalizationHelper; import com.arsdigita.globalization.GlobalizationHelper;
import java.text.DateFormat; import java.text.DateFormat;
import java.util.Date;
/** /**
* Authoring step to edit the simple attributes of the Agenda content type (and * Authoring step to edit the simple attributes of the Agenda content type (and
@ -62,7 +64,8 @@ public class AgendaPropertiesStep extends SimpleEditStep {
BasicPageForm editSheet; BasicPageForm editSheet;
editSheet = new AgendaPropertyForm(itemModel, this); editSheet = new AgendaPropertyForm(itemModel, this);
add(EDIT_SHEET_NAME, "Edit", add(EDIT_SHEET_NAME,
"Edit",
new WorkflowLockedComponentAccess(editSheet, itemModel), new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton() ); editSheet.getSaveCancelSection().getCancelButton() );
@ -88,57 +91,153 @@ public class AgendaPropertiesStep extends SimpleEditStep {
.globalize("cms.contenttypes.ui.name"), Agenda.NAME ); .globalize("cms.contenttypes.ui.name"), Agenda.NAME );
if (!ContentSection.getConfig().getHideLaunchDate()) { if (!ContentSection.getConfig().getHideLaunchDate()) {
sheet.add(AgendaGlobalizationUtil sheet.add(GlobalizationUtil
.globalize("cms.ui.authoring.page_launch_date"), .globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE, ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new LaunchDateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
ContentPage page = (ContentPage) item;
if(page.getLaunchDate() != null) {
return DateFormat.getDateInstance
(DateFormat.LONG,
GlobalizationHelper.getNegotiatedLocale())
.format(page.getLaunchDate());
} else {
return (String)AgendaGlobalizationUtil.globalize("cms.ui.unknown").localize();
}
}
});
} }
sheet.add(AgendaGlobalizationUtil sheet.add(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.summary"), Agenda.SUMMARY); .globalize("cms.contenttypes.ui.summary"),
Agenda.SUMMARY);
sheet.add(AgendaGlobalizationUtil sheet.add(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.agenda_date"), Agenda.AGENDA_DATE); .globalize("cms.contenttypes.ui.agenda.agenda_date"),
Agenda.AGENDA_DATE,
new DateTimeAttributeFormatter());
sheet.add(AgendaGlobalizationUtil sheet.add(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.location"), Agenda.LOCATION); .globalize("cms.contenttypes.ui.agenda.location"),
Agenda.LOCATION);
sheet.add(AgendaGlobalizationUtil sheet.add(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.attendees"), Agenda.ATTENDEES); .globalize("cms.contenttypes.ui.agenda.attendees"),
Agenda.ATTENDEES);
sheet.add(AgendaGlobalizationUtil sheet.add(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.subject_items"), Agenda.SUBJECT_ITEMS); .globalize("cms.contenttypes.ui.agenda.subject_items"),
Agenda.SUBJECT_ITEMS);
sheet.add(AgendaGlobalizationUtil sheet.add(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.contact_info"), Agenda.CONTACT_INFO); .globalize("cms.contenttypes.ui.agenda.contact_info"),
Agenda.CONTACT_INFO);
sheet.add(AgendaGlobalizationUtil sheet.add(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.creation_date"), .globalize("cms.contenttypes.ui.agenda.creation_date"),
Agenda.AGENDA_DATE, Agenda.CREATION_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new DateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
Agenda agenda = (Agenda) item;
if(agenda.getCreationDate() != null) {
return DateFormat.getDateInstance(
DateFormat.LONG,
GlobalizationHelper.getNegotiatedLocale())
.format(agenda.getCreationDate());
} else {
return (String)AgendaGlobalizationUtil
.globalize("cms.ui.unknown").localize();
}
}
});
return sheet; return sheet;
} }
/**
* Private class which implements an AttributeFormatter interface for
* Agenda's date values.
* Its format(...) class returns a string representation for either a
* false or a true value.
*/
private static class DateAttributeFormatter
implements DomainObjectPropertySheet.AttributeFormatter {
/**
* Constructor, does nothing.
*/
public DateAttributeFormatter() {
}
/**
* Formatter for the value of an attribute.
*
* It currently relays on the prerequisite that the passed in property
* attribute is in fact a date property. No type checking yet!
*
* Note: the format method has to be executed at each page request. Take
* care to properly adjust globalization and localization here!
*
* @param obj Object containing the attribute to format.
* @param attribute Name of the attribute to retrieve and format
* @param state PageState of the request
* @return A String representation of the retrieved boolean
* attribute of the domain object.
*/
public String format(DomainObject obj, String attribute, PageState state) {
if ( obj != null && obj instanceof Agenda) {
Agenda agenda = (Agenda) obj;
Object field = agenda.get(attribute);
if( field != null ) {
// Note: No type safety here! We relay that it is
// attached to a date property!
return DateFormat.getDateInstance(
DateFormat.LONG,
GlobalizationHelper.getNegotiatedLocale()
)
.format(field);
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
return (String) GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
/**
* Private class which implements an AttributeFormatter interface for
* boolean values.
* Its format(...) class returns a string representation for either a
* false or a true value.
*/
private static class DateTimeAttributeFormatter
implements DomainObjectPropertySheet.AttributeFormatter {
/**
* Constructor, does nothing.
*/
public DateTimeAttributeFormatter() {
}
/**
* Formatter for the value of an attribute.
*
* It currently relays on the prerequisite that the passed in property
* attribute is in fact a date property. No type checking yet!
*
* Note: the format method has to be executed at each page request. Take
* care to properly adjust globalization and localization here!
*
* @param obj Object containing the attribute to format.
* @param attribute Name of the attribute to retrieve and format
* @param state PageState of the request
* @return A String representation of the retrieved boolean
* attribute of the domain object.
*/
public String format(DomainObject obj, String attribute, PageState state) {
if ( obj != null && obj instanceof Agenda) {
Agenda agenda = (Agenda) obj;
Object field = agenda.get(attribute);
if( field != null ) {
// Note: No type safety here! We relay that it is
// attached to a date property!
return DateFormat.getDateTimeInstance(
DateFormat.LONG,
DateFormat.SHORT,
GlobalizationHelper.getNegotiatedLocale()
)
.format(field);
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
return (String) GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
} }

View File

@ -99,7 +99,8 @@ public class AgendaPropertyForm extends BasicPageForm
protected void addWidgets() { protected void addWidgets() {
super.addWidgets(); super.addWidgets();
add(new Label(AgendaGlobalizationUtil.globalize("cms.contenttypes.ui.summary"))); add(new Label(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.summary")));
ParameterModel summaryParam = new StringParameter(SUMMARY); ParameterModel summaryParam = new StringParameter(SUMMARY);
//summaryParam //summaryParam
// .addParameterListener(new NotNullValidationListener()); // .addParameterListener(new NotNullValidationListener());
@ -109,14 +110,16 @@ public class AgendaPropertyForm extends BasicPageForm
summary.setRows(5); summary.setRows(5);
add(summary); add(summary);
add(new Label(AgendaGlobalizationUtil.globalize("cms.contenttypes.ui.agenda.agenda_date"))); add(new Label(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.agenda_date")));
ParameterModel agendaDateParam = new DateTimeParameter(AGENDA_DATE); ParameterModel agendaDateParam = new DateTimeParameter(AGENDA_DATE);
agendaDateParam agendaDateParam
.addParameterListener(new NotNullValidationListener()); .addParameterListener(new NotNullValidationListener());
DateTime agendaDate = new DateTime(agendaDateParam); DateTime agendaDate = new DateTime(agendaDateParam);
add(agendaDate); add(agendaDate);
add(new Label(AgendaGlobalizationUtil.globalize("cms.contenttypes.ui.agenda.location"))); add(new Label(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.location")));
ParameterModel locationParam = new StringParameter(LOCATION); ParameterModel locationParam = new StringParameter(LOCATION);
//locationParam //locationParam
// .addParameterListener(new NotNullValidationListener()); // .addParameterListener(new NotNullValidationListener());
@ -126,7 +129,8 @@ public class AgendaPropertyForm extends BasicPageForm
location.setRows(3); location.setRows(3);
add(location); add(location);
add(new Label(AgendaGlobalizationUtil.globalize("cms.contenttypes.ui.agenda.attendees"))); add(new Label(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.attendees")));
ParameterModel attendeesParam = new StringParameter(ATTENDEES); ParameterModel attendeesParam = new StringParameter(ATTENDEES);
//attendeesParam //attendeesParam
// .addParameterListener(new NotNullValidationListener()); // .addParameterListener(new NotNullValidationListener());
@ -136,7 +140,8 @@ public class AgendaPropertyForm extends BasicPageForm
attendees.setRows(3); attendees.setRows(3);
add(attendees); add(attendees);
add(new Label(AgendaGlobalizationUtil.globalize("cms.contenttypes.ui.agenda.subject_items"))); add(new Label(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.subject_items")));
ParameterModel subjectItemsParam = new StringParameter(SUBJECT_ITEMS); ParameterModel subjectItemsParam = new StringParameter(SUBJECT_ITEMS);
//subjectItemsParam //subjectItemsParam
// .addParameterListener(new NotNullValidationListener()); // .addParameterListener(new NotNullValidationListener());
@ -146,7 +151,8 @@ public class AgendaPropertyForm extends BasicPageForm
subjectItems.setRows(3); subjectItems.setRows(3);
add(subjectItems); add(subjectItems);
add(new Label(AgendaGlobalizationUtil.globalize("cms.contenttypes.ui.agenda.contact_info"))); add(new Label(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.contact_info")));
ParameterModel contactInfoParam = new StringParameter(CONTACT_INFO); ParameterModel contactInfoParam = new StringParameter(CONTACT_INFO);
//contactInfoParam //contactInfoParam
// .addParameterListener(new NotNullValidationListener()); // .addParameterListener(new NotNullValidationListener());
@ -156,7 +162,8 @@ public class AgendaPropertyForm extends BasicPageForm
contactInfo.setRows(3); contactInfo.setRows(3);
add(contactInfo); add(contactInfo);
add(new Label(AgendaGlobalizationUtil.globalize("cms.contenttypes.ui.agenda.creation_date"))); add(new Label(AgendaGlobalizationUtil
.globalize("cms.contenttypes.ui.agenda.creation_date")));
ParameterModel creationDateParam = new DateParameter(CREATION_DATE); ParameterModel creationDateParam = new DateParameter(CREATION_DATE);
creationDateParam creationDateParam
.addParameterListener(new NotNullValidationListener()); .addParameterListener(new NotNullValidationListener());
@ -201,12 +208,11 @@ public class AgendaPropertyForm extends BasicPageForm
/** /**
* Form processing hook. Saves Agenda object. * Form processing hook. Saves Agenda object.
**/ */
public void process(FormSectionEvent fse) { public void process(FormSectionEvent fse) {
FormData data = fse.getFormData(); FormData data = fse.getFormData();
Agenda agenda Agenda agenda = (Agenda) super.processBasicWidgets(fse);
= (Agenda) super.processBasicWidgets(fse);
// save only if save button was pressed // save only if save button was pressed
if (agenda != null if (agenda != null

View File

@ -21,6 +21,8 @@ package com.arsdigita.cms.contenttypes.ui.authoring;
import com.arsdigita.cms.contenttypes.FileStorageItem; import com.arsdigita.cms.contenttypes.FileStorageItem;
import com.arsdigita.cms.contenttypes.ui.FileStorageItemPropertyForm; import com.arsdigita.cms.contenttypes.ui.FileStorageItemPropertyForm;
import com.arsdigita.bebop.Component; import com.arsdigita.bebop.Component;
import com.arsdigita.cms.ContentPage;
import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ui.authoring.BasicPageForm; import com.arsdigita.cms.ui.authoring.BasicPageForm;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
@ -70,12 +72,18 @@ public class FileStorageItemPropertiesStep
itemModel ) { itemModel ) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel ); DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel );
sheet.add(GlobalizationUtil
.globalize("cms.ui.authoring.name"), FileStorageItem.NAME );
sheet.add( GlobalizationUtil sheet.add( GlobalizationUtil
.globalize("cms.ui.authoring.title"), FileStorageItem.TITLE ); .globalize("cms.ui.authoring.title"), FileStorageItem.TITLE );
sheet.add(GlobalizationUtil
.globalize("cms.ui.authoring.name"), FileStorageItem.NAME );
sheet.add( GlobalizationUtil sheet.add( GlobalizationUtil
.globalize("cms.contenttypes.ui.summary"), FileStorageItem.DESCRIPTION ); .globalize("cms.contenttypes.ui.summary"), FileStorageItem.DESCRIPTION );
if (!ContentSection.getConfig().getHideLaunchDate()) {
sheet.add(GlobalizationUtil
.globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE,
new LaunchDateAttributeFormatter() );
}
return sheet; return sheet;
} }

View File

@ -36,7 +36,8 @@ import com.arsdigita.domain.DomainObject;
import java.text.DateFormat; import java.text.DateFormat;
/** /**
* Authoring step to edit the simple attributes of the InlineSite content type (and its subclasses). * Authoring step to edit the simple attributes of the InlineSite content type
* (and its subclasses).
*/ */
public class InlineSitePropertiesStep extends SimpleEditStep { public class InlineSitePropertiesStep extends SimpleEditStep {
@ -77,23 +78,7 @@ public class InlineSitePropertiesStep extends SimpleEditStep {
sheet.add(GlobalizationUtil sheet.add(GlobalizationUtil
.globalize("cms.contenttypes.ui.launch_date"), .globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE, ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new LaunchDateAttributeFormatter() );
@Override
public String format(final DomainObject item,
final String attribute,
final PageState state) {
ContentPage page = (ContentPage) item;
if (page.getLaunchDate() != null) {
return DateFormat
.getDateInstance(DateFormat.LONG)
.format(page.getLaunchDate());
} else {
return (String) GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
});
} }
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.summary"), sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.summary"),

View File

@ -26,13 +26,14 @@ import com.arsdigita.cms.ContentSection;
import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.Job; import com.arsdigita.cms.contenttypes.Job;
import com.arsdigita.cms.contenttypes.util.JobGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.JobGlobalizationUtil;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; 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.cms.util.GlobalizationUtil; import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.domain.DomainObject;
import com.arsdigita.globalization.GlobalizationHelper;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import java.text.DateFormat; import java.text.DateFormat;
@ -89,27 +90,14 @@ public class JobPropertiesStep extends SimpleEditStep {
Job.NAME); Job.NAME);
if (!ContentSection.getConfig().getHideLaunchDate()) { if (!ContentSection.getConfig().getHideLaunchDate()) {
sheet.add(GlobalizationUtil.globalize("cms.contenttypes.ui.launch_date"), sheet.add(GlobalizationUtil
.globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE, ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new LaunchDateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
ContentPage page = (ContentPage) item;
if(page.getLaunchDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG)
.format(page.getLaunchDate());
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
});
} }
// Job content type currently does not use the default // Job content type currently does not use the default
// basic descriuption properties (as persisted in cms-pages and by // basic description properties (as persisted in cms-pages and by
// default part of the object list). Would be convenient to move the // default part of the object list). Would be convenient to move the
// ct specific overview property to basic description. // ct specific overview property to basic description.
sheet.add( JobGlobalizationUtil sheet.add( JobGlobalizationUtil
@ -122,22 +110,7 @@ public class JobPropertiesStep extends SimpleEditStep {
sheet.add( JobGlobalizationUtil sheet.add( JobGlobalizationUtil
.globalize("cms.contenttypes.ui.job.closing_date"), .globalize("cms.contenttypes.ui.job.closing_date"),
Job.CLOSING_DATE, Job.CLOSING_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new JobDateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
Job job = (Job) item;
if(job.getClosingDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG)
.format(job.getClosingDate());
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
});
sheet.add( JobGlobalizationUtil sheet.add( JobGlobalizationUtil
.globalize("cms.contenttypes.ui.job.salary"), .globalize("cms.contenttypes.ui.job.salary"),
Job.SALARY); Job.SALARY);
@ -159,4 +132,62 @@ public class JobPropertiesStep extends SimpleEditStep {
return sheet; return sheet;
} }
/**
* Private class which implements an AttributeFormatter interface for
* boolean values.
* Its format(...) class returns a string representation for either a
* false or a true value.
*/
private static class JobDateAttributeFormatter
implements DomainObjectPropertySheet.AttributeFormatter {
/**
* Constructor, does nothing.
*/
public JobDateAttributeFormatter() {
}
/**
* Formatter for the value of an attribute.
*
* It currently relays on the prerequisite that the passed in property
* attribute is in fact a date property. No type checking yet!
*
* Note: the format method has to be executed at each page request. Take
* care to properly adjust globalization and localization here!
*
* @param obj Object containing the attribute to format.
* @param attribute Name of the attribute to retrieve and format
* @param state PageState of the request
* @return A String representation of the retrieved boolean
* attribute of the domain object.
*/
public String format(DomainObject obj, String attribute, PageState state) {
if ( obj != null && obj instanceof Job) {
Job job = (Job) obj;
Object field = job.get(attribute);
if( field != null ) {
// Note: No type safety here! We relay that it is
// attached to a date property!
return DateFormat.getDateInstance(
DateFormat.LONG,
GlobalizationHelper.getNegotiatedLocale()
)
.format(field);
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
return (String) GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
} }

View File

@ -86,21 +86,7 @@ public class LegalNoticePropertiesStep extends SimpleEditStep {
sheet.add(GlobalizationUtil sheet.add(GlobalizationUtil
.globalize("cms.contenttypes.ui.launch_date"), .globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE, ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new LaunchDateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
ContentPage page = (ContentPage) item;
if(page.getLaunchDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG)
.format(page.getLaunchDate());
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
});
} }
sheet.add( LegalNoticeGlobalizationUtil sheet.add( LegalNoticeGlobalizationUtil
.globalize("cms.contenttypes.ui.legal_notice.government_uid"), .globalize("cms.contenttypes.ui.legal_notice.government_uid"),

View File

@ -56,7 +56,9 @@ public class MinutesPropertiesStep extends SimpleEditStep {
BasicPageForm editSheet; BasicPageForm editSheet;
editSheet = new MinutesPropertyForm(itemModel,this); editSheet = new MinutesPropertyForm(itemModel,this);
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, itemModel), add(EDIT_SHEET_NAME,
"Edit",
new WorkflowLockedComponentAccess(editSheet, itemModel),
editSheet.getSaveCancelSection().getCancelButton()); editSheet.getSaveCancelSection().getCancelButton());
setDisplayComponent(getMinutesPropertySheet(itemModel)); setDisplayComponent(getMinutesPropertySheet(itemModel));
@ -86,21 +88,7 @@ public class MinutesPropertiesStep extends SimpleEditStep {
sheet.add(GlobalizationUtil sheet.add(GlobalizationUtil
.globalize("cms.contenttypes.ui.launch_date"), .globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE, ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new LaunchDateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
ContentPage page = (ContentPage) item;
if(page.getLaunchDate() != null) {
return DateFormat.getDateInstance(DateFormat.LONG)
.format(page.getLaunchDate());
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
});
} }
sheet.add( MinutesGlobalizationUtil sheet.add( MinutesGlobalizationUtil
.globalize("cms.contenttypes.ui.minutes.reference"), .globalize("cms.contenttypes.ui.minutes.reference"),

View File

@ -31,6 +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.NewsItemGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.NewsItemGlobalizationUtil;
import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.globalization.GlobalizationHelper; import com.arsdigita.globalization.GlobalizationHelper;
@ -57,8 +58,9 @@ public class NewsItemPropertiesStep extends SimpleEditStep {
BasicPageForm editSheet; BasicPageForm editSheet;
editSheet = new NewsItemPropertyForm(itemModel, this); editSheet = new NewsItemPropertyForm(itemModel, this);
add(EDIT_SHEET_NAME, "Edit", new WorkflowLockedComponentAccess(editSheet, add(EDIT_SHEET_NAME,
itemModel), "Edit",
new WorkflowLockedComponentAccess(editSheet,itemModel),
editSheet.getSaveCancelSection().getCancelButton()); editSheet.getSaveCancelSection().getCancelButton());
setDisplayComponent(getNewsDomainObjectPropertySheet(itemModel)); setDisplayComponent(getNewsDomainObjectPropertySheet(itemModel));
@ -84,27 +86,10 @@ public class NewsItemPropertiesStep extends SimpleEditStep {
.globalize("cms.contenttypes.ui.newsitem.lead"), NewsItem.LEAD); .globalize("cms.contenttypes.ui.newsitem.lead"), NewsItem.LEAD);
if (!ContentSection.getConfig().getHideLaunchDate()) { if (!ContentSection.getConfig().getHideLaunchDate()) {
sheet.add(NewsItemGlobalizationUtil.globalize( sheet.add(GlobalizationUtil
"cms.contenttypes.ui.launch_date"), .globalize("cms.contenttypes.ui.launch_date"),
ContentPage.LAUNCH_DATE, ContentPage.LAUNCH_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new LaunchDateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
ContentPage page = (ContentPage) item;
if (page.getLaunchDate() != null) {
return DateFormat.getDateInstance(
DateFormat.LONG,
GlobalizationHelper.getNegotiatedLocale())
.format(page.getLaunchDate());
} else {
return (String) NewsItemGlobalizationUtil
.globalize("cms.contenttypes.ui.newsitem.unknown")
.localize();
}
}
});
} }
// Show news item on homepage? // Show news item on homepage?
@ -135,25 +120,66 @@ public class NewsItemPropertiesStep extends SimpleEditStep {
sheet.add(NewsItemGlobalizationUtil.globalize( sheet.add(NewsItemGlobalizationUtil.globalize(
"cms.contenttypes.ui.newsitem.news_date"), "cms.contenttypes.ui.newsitem.news_date"),
NewsItem.NEWS_DATE, NewsItem.NEWS_DATE,
new DomainObjectPropertySheet.AttributeFormatter() { new NewsItemDateAttributeFormatter() );
public String format(DomainObject item,
String attribute,
PageState state) {
NewsItem pr = (NewsItem) item;
if (pr.getNewsDate() != null) {
return DateFormat.getDateInstance(
DateFormat.LONG,
GlobalizationHelper.getNegotiatedLocale())
.format(pr.getNewsDate());
} else {
return (String) NewsItemGlobalizationUtil
.globalize("cms.contenttypes.ui.newsitem.unknown")
.localize();
}
}
});
return sheet; return sheet;
} }
/**
* Private class which implements an AttributeFormatter interface for
* NewsItem's date values.
* Its format(...) class returns a string representation for either a
* false or a true value.
*/
private static class NewsItemDateAttributeFormatter
implements DomainObjectPropertySheet.AttributeFormatter {
/**
* Constructor, does nothing.
*/
public NewsItemDateAttributeFormatter() {
}
/**
* Formatter for the value of an attribute.
*
* It currently relays on the prerequisite that the passed in property
* attribute is in fact a date property. No type checking yet!
*
* Note: the format method has to be executed at each page request. Take
* care to properly adjust globalization and localization here!
*
* @param obj Object containing the attribute to format.
* @param attribute Name of the attribute to retrieve and format
* @param state PageState of the request
* @return A String representation of the retrieved boolean
* attribute of the domain object.
*/
public String format(DomainObject obj, String attribute, PageState state) {
if ( obj != null && obj instanceof NewsItem) {
NewsItem newsItem = (NewsItem) obj;
Object field = newsItem.get(attribute);
if( field != null ) {
// Note: No type safety here! We relay that it is
// attached to a date property!
return DateFormat.getDateInstance(
DateFormat.LONG,
GlobalizationHelper.getNegotiatedLocale()
)
.format(field);
} else {
return (String)GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
return (String) GlobalizationUtil
.globalize("cms.ui.unknown")
.localize();
}
}
} }

View File

@ -48,11 +48,15 @@ public class SiteProxy extends ContentPage {
public static final String USED_IN_ATOZ = "usedInAtoZ"; public static final String USED_IN_ATOZ = "usedInAtoZ";
/** Data object type for this domain object */ /** Data object type for this domain object */
public static final String BASE_DATA_OBJECT_TYPE = "com.arsdigita.cms.contenttypes.SiteProxy"; public static final String BASE_DATA_OBJECT_TYPE =
"com.arsdigita.cms.contenttypes.SiteProxy";
/** Data object type for this domain object (for CMS compatibility) */ /** Data object type for this domain object (for CMS compatibility) */
public static final String TYPE = BASE_DATA_OBJECT_TYPE; public static final String TYPE = BASE_DATA_OBJECT_TYPE;
/**
* Default Constructor.
*/
public SiteProxy() { public SiteProxy() {
this(BASE_DATA_OBJECT_TYPE); this(BASE_DATA_OBJECT_TYPE);
try { try {

View File

@ -10,3 +10,5 @@ cms.contenttypes.ui.siteproxy.label.usedinatoz=Used in AtoZ
cms.contenttypes.ui.siteproxy.option.usedinatoz.yes=Yes cms.contenttypes.ui.siteproxy.option.usedinatoz.yes=Yes
cms.contenttypes.ui.siteproxy.option.usedinatoz.no=No cms.contenttypes.ui.siteproxy.option.usedinatoz.no=No
cms.contenttypes.ui.siteproxy.link.editatoz=Edit cms.contenttypes.ui.siteproxy.link.editatoz=Edit
#URL:
cms.contenttypes.ui.siteproxy.url=URL:

View File

@ -9,4 +9,6 @@ cms.contenttypes.ui.siteproxy.label.atoztitle=AtoZ Titel
cms.contenttypes.ui.siteproxy.label.usedinatoz=In AtoZ benutzen cms.contenttypes.ui.siteproxy.label.usedinatoz=In AtoZ benutzen
cms.contenttypes.ui.siteproxy.option.usedinatoz.yes=Ja cms.contenttypes.ui.siteproxy.option.usedinatoz.yes=Ja
cms.contenttypes.ui.siteproxy.option.usedinatoz.no=Nein cms.contenttypes.ui.siteproxy.option.usedinatoz.no=Nein
cms.contenttypes.ui.siteproxy.link.editatoz=Editieren cms.contenttypes.ui.siteproxy.link.editatoz=Bearbeiten
#URL:
cms.contenttypes.ui.siteproxy.url=URL:

View File

@ -10,3 +10,5 @@ cms.contenttypes.ui.siteproxy.label.usedinatoz=Used in AtoZ
cms.contenttypes.ui.siteproxy.option.usedinatoz.yes=Yes cms.contenttypes.ui.siteproxy.option.usedinatoz.yes=Yes
cms.contenttypes.ui.siteproxy.option.usedinatoz.no=No cms.contenttypes.ui.siteproxy.option.usedinatoz.no=No
cms.contenttypes.ui.siteproxy.link.editatoz=Edit cms.contenttypes.ui.siteproxy.link.editatoz=Edit
#URL:
cms.contenttypes.ui.siteproxy.url=URL:

View File

@ -1,29 +0,0 @@
/*
* Copyright (C) 2004 Red Hat Inc. All Rights Reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
package com.arsdigita.cms.contenttypes.ui;
interface Constants {
/* Globalization constants */
static final String LABEL_TITLE_ATOZ = "cms.contenttypes.ui.siteproxy.label.atoztitle";
static final String LABEL_USED_IN_ATOZ = "cms.contenttypes.ui.siteproxy.label.usedinatoz";
static final String OPTION_USED_IN_ATOZ_YES = "cms.contenttypes.ui.siteproxy.option.usedinatoz.yes";
static final String OPTION_USED_IN_ATOZ_NO = "cms.contenttypes.ui.siteproxy.option.usedinatoz.no";
}

View File

@ -33,28 +33,30 @@ import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
/** /**
* Authoring step to edit the simple attributes for the SiteProxy content * Authoring step to edit the simple attributes for the SiteProxy content
* connection to new AtoZ * connection to new AtoZ.
*/ */
public class SiteProxyAtoZPropertiesStep extends SimpleEditStep { public class SiteProxyAtoZPropertiesStep extends SimpleEditStep {
/** The name of the editing sheet added to this step */ /** The name of the editing sheet added to this step */
public static final String EDIT_ATOZ_SHEET_NAME = "editAtoZ"; public static final String EDIT_ATOZ_SHEET_NAME = "editAtoZ";
public static final String LINK_EDIT = "cms.contenttypes.ui.siteproxy.link.editatoz";
/** /**
* Constructor.
*
* @param itemModel * @param itemModel
* @param parent * @param parent
*/ */
public SiteProxyAtoZPropertiesStep(ItemSelectionModel itemModel, public SiteProxyAtoZPropertiesStep(ItemSelectionModel itemModel,
AuthoringKitWizard parent) { AuthoringKitWizard parent) {
super(itemModel, parent); super(itemModel, parent);
BasicItemForm form; BasicItemForm form;
form = new SiteProxyAtoZPropertyForm(itemModel); form = new SiteProxyAtoZPropertyForm(itemModel);
add(EDIT_ATOZ_SHEET_NAME, SiteProxyGlobalizationUtil.globalize( add(EDIT_ATOZ_SHEET_NAME,
LINK_EDIT).localize().toString(), SiteProxyGlobalizationUtil.globalize(
"cms.contenttypes.ui.siteproxy.link.editatoz").localize().toString(),
new WorkflowLockedComponentAccess(form, itemModel), form new WorkflowLockedComponentAccess(form, itemModel), form
.getSaveCancelSection().getCancelButton()); .getSaveCancelSection().getCancelButton());
@ -73,37 +75,52 @@ public class SiteProxyAtoZPropertiesStep extends SimpleEditStep {
*/ */
public static Component getSiteProxyAtoZPropertySheet( public static Component getSiteProxyAtoZPropertySheet(
ItemSelectionModel itemModel) { ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(
itemModel); itemModel);
sheet.add(SiteProxyGlobalizationUtil sheet.add(SiteProxyGlobalizationUtil
.globalize(Constants.LABEL_TITLE_ATOZ), SiteProxy.TITLE_ATOZ); .globalize("cms.contenttypes.ui.siteproxy.label.atoztitle"),
SiteProxy.TITLE_ATOZ);
sheet.add(SiteProxyGlobalizationUtil sheet.add(SiteProxyGlobalizationUtil
.globalize(Constants.LABEL_USED_IN_ATOZ), .globalize("cms.contenttypes.ui.siteproxy.label.usedinatoz"),
SiteProxy.USED_IN_ATOZ, new BooleanAttributeFormater( SiteProxy.USED_IN_ATOZ,
(String) SiteProxyGlobalizationUtil.globalize( new BooleanAttributeFormater());
Constants.OPTION_USED_IN_ATOZ_YES).localize(),
(String) SiteProxyGlobalizationUtil.globalize(
Constants.OPTION_USED_IN_ATOZ_NO).localize()));
return sheet; return sheet;
} }
private static class BooleanAttributeFormater implements /**
DomainObjectPropertySheet.AttributeFormatter { * Private class which implements an AttributeFormatter interface for
* boolean values.
* Its format(...) class returns a string representation for either a
* false or a true value.
*/
private static class BooleanAttributeFormater
implements DomainObjectPropertySheet.AttributeFormatter {
/** Default value just in case there is no value at all. */
private static final String DEFAULT = "-"; private static final String DEFAULT = "-";
private String trueValue; /**
* Constructor, does nothing.
private String falseValue; */
public BooleanAttributeFormater() {
public BooleanAttributeFormater(String trueValue, String falseValue) {
this.trueValue = trueValue;
this.falseValue = falseValue;
} }
/**
* Formatter for the value of an attribute.
*
* Note: the format method has to be executed at each page request. Take
* care to properly adjust globalization and localization here!
*
* @param obj Object containing the attribute to format.
* @param attribute Name of the attribute to retrieve and format
* @param state PageState of the request
* @return A String representation of the retrieved boolean
* attribute of the domain object.
*/
public String format(DomainObject obj, String attribute, PageState state) { public String format(DomainObject obj, String attribute, PageState state) {
if (obj == null) if (obj == null)
return BooleanAttributeFormater.DEFAULT; return BooleanAttributeFormater.DEFAULT;
@ -116,10 +133,19 @@ public class SiteProxyAtoZPropertiesStep extends SimpleEditStep {
if (field instanceof Boolean) { if (field instanceof Boolean) {
Boolean value = (Boolean) contentItem.get(attribute); Boolean value = (Boolean) contentItem.get(attribute);
if (value.booleanValue()) if (value.booleanValue()) {
return trueValue;
else return (String) SiteProxyGlobalizationUtil.globalize(
return falseValue; "cms.contenttypes.ui.siteproxy.option.usedinatoz.yes")
.localize();
} else {
return (String) SiteProxyGlobalizationUtil.globalize(
"cms.contenttypes.ui.siteproxy.option.usedinatoz.no")
.localize();
}
} }
} }
return BooleanAttributeFormater.DEFAULT; return BooleanAttributeFormater.DEFAULT;

View File

@ -59,24 +59,28 @@ public class SiteProxyAtoZPropertyForm extends BasicItemForm {
/** /**
* Adds widgets to the form. * Adds widgets to the form.
*/ */
@Override
protected void addWidgets() { protected void addWidgets() {
add(new Label(SiteProxyGlobalizationUtil add(new Label(SiteProxyGlobalizationUtil
.globalize(Constants.LABEL_TITLE_ATOZ))); .globalize("cms.contenttypes.ui.siteproxy.label.atoztitle")));
m_title_atoz = new TextField(SiteProxy.TITLE_ATOZ); m_title_atoz = new TextField(SiteProxy.TITLE_ATOZ);
m_title_atoz.setSize(50); m_title_atoz.setSize(50);
add(m_title_atoz); add(m_title_atoz);
add(new Label(SiteProxyGlobalizationUtil add(new Label(SiteProxyGlobalizationUtil
.globalize(Constants.LABEL_USED_IN_ATOZ))); .globalize("cms.contenttypes.ui.siteproxy.label.usedinatoz")));
m_radiogroupUsedInAtoZ = new RadioGroup(SiteProxy.USED_IN_ATOZ); m_radiogroupUsedInAtoZ = new RadioGroup(SiteProxy.USED_IN_ATOZ);
m_radiogroupUsedInAtoZ.addOption(new Option(Boolean.TRUE.toString(), m_radiogroupUsedInAtoZ.addOption(new
SiteProxyGlobalizationUtil.globalize( Option(Boolean.TRUE.toString(),
Constants.OPTION_USED_IN_ATOZ_YES).localize() new Label( SiteProxyGlobalizationUtil.globalize(
.toString())); "cms.contenttypes.ui.siteproxy.option.usedinatoz.yes"))
m_radiogroupUsedInAtoZ ));
.addOption(new Option(Boolean.FALSE.toString(), m_radiogroupUsedInAtoZ.addOption(new
SiteProxyGlobalizationUtil.globalize( Option(Boolean.FALSE.toString(),
Constants.OPTION_USED_IN_ATOZ_NO).localize() new Label( SiteProxyGlobalizationUtil.globalize(
.toString())); "cms.contenttypes.ui.siteproxy.option.usedinatoz.no"))
));
add(m_radiogroupUsedInAtoZ); add(m_radiogroupUsedInAtoZ);
} }

View File

@ -26,6 +26,7 @@ import com.arsdigita.cms.ItemSelectionModel;
import com.arsdigita.cms.contenttypes.util.SiteProxyGlobalizationUtil; import com.arsdigita.cms.contenttypes.util.SiteProxyGlobalizationUtil;
import com.arsdigita.cms.ui.authoring.AuthoringKitWizard; import com.arsdigita.cms.ui.authoring.AuthoringKitWizard;
import com.arsdigita.cms.ui.authoring.SimpleEditStep; import com.arsdigita.cms.ui.authoring.SimpleEditStep;
import com.arsdigita.cms.util.GlobalizationUtil;
import com.arsdigita.toolbox.ui.DomainObjectPropertySheet; import com.arsdigita.toolbox.ui.DomainObjectPropertySheet;
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess; import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
@ -62,8 +63,9 @@ public class SiteProxyPropertiesStep extends SimpleEditStep {
} }
/** /**
* Returns a component that displays the properties of the * Returns a component that displays the properties of the SiteProxy
* SiteProxy specified by the ItemSelectionModel passed in. * specified by the ItemSelectionModel passed in.
*
* @param itemModel The ItemSelectionModel to use * @param itemModel The ItemSelectionModel to use
* @pre itemModel != null * @pre itemModel != null
* @return A component to display the state of the basic properties * @return A component to display the state of the basic properties
@ -73,14 +75,14 @@ public class SiteProxyPropertiesStep extends SimpleEditStep {
itemModel ) { itemModel ) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel ); DomainObjectPropertySheet sheet = new DomainObjectPropertySheet( itemModel );
sheet.add( SiteProxyGlobalizationUtil sheet.add( GlobalizationUtil
.globalize("cms.contenttypes.ui.title"), .globalize("cms.contenttypes.ui.title"),
SiteProxy.TITLE ); SiteProxy.TITLE );
sheet.add( SiteProxyGlobalizationUtil sheet.add( GlobalizationUtil
.globalize("cms.contenttypes.ui.name"), .globalize("cms.contenttypes.ui.name"),
SiteProxy.NAME ); SiteProxy.NAME );
sheet.add( SiteProxyGlobalizationUtil sheet.add( SiteProxyGlobalizationUtil
.globalize("cms.contenttypes.ui.url"), .globalize("cms.contenttypes.ui.siteproxy.url"),
SiteProxy.URL ); SiteProxy.URL );
return sheet; return sheet;

View File

@ -39,10 +39,12 @@ public class XMLFeedProperties extends FormProperties {
super(model, parent); super(model, parent);
} }
@Override
protected BasicPageForm buildEditForm(ItemSelectionModel model) { protected BasicPageForm buildEditForm(ItemSelectionModel model) {
return new XMLFeedPropertyEditForm(model); return new XMLFeedPropertyEditForm(model);
} }
@Override
protected Component buildDisplayComponent(ItemSelectionModel model) { protected Component buildDisplayComponent(ItemSelectionModel model) {
return new XMLFeedPropertySheet(model); return new XMLFeedPropertySheet(model);
} }
@ -55,6 +57,7 @@ public class XMLFeedProperties extends FormProperties {
super(model); super(model);
} }
@Override
protected void addWidgets() { protected void addWidgets() {
super.addWidgets(); super.addWidgets();
@ -66,6 +69,7 @@ public class XMLFeedProperties extends FormProperties {
add(m_url); add(m_url);
} }
@Override
public ContentPage initBasicWidgets(FormSectionEvent e) { public ContentPage initBasicWidgets(FormSectionEvent e) {
XMLFeed item = (XMLFeed)super.initBasicWidgets(e); XMLFeed item = (XMLFeed)super.initBasicWidgets(e);
@ -74,6 +78,7 @@ public class XMLFeedProperties extends FormProperties {
} }
@Override
public ContentPage processBasicWidgets(FormSectionEvent e) { public ContentPage processBasicWidgets(FormSectionEvent e) {
XMLFeed item = (XMLFeed)super.processBasicWidgets(e); XMLFeed item = (XMLFeed)super.processBasicWidgets(e);

View File

@ -68,9 +68,9 @@ import org.apache.log4j.Logger;
/** /**
* <p> * <p>
* This class represents the authoring step for the * This class represents the authoring step for the {@link XmlFeed XmlFeed}
* {@link XmlFeed XmlFeed} that allows you to associate the correct XSL file to * that allows you to associate the correct XSL file to allow the feed to
* allow the feed to be transformed into HTML. * be transformed into HTML.
* </p> * </p>
* *
* <p> * <p>

View File

@ -71,14 +71,14 @@ public class ContactPropertiesStep extends SimpleEditStep {
public static Component getContactPropertySheet(ItemSelectionModel itemModel) { public static Component getContactPropertySheet(ItemSelectionModel itemModel) {
DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel); DomainObjectPropertySheet sheet = new DomainObjectPropertySheet(itemModel);
sheet.add(
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.name"),
Contact.NAME);
sheet.add( sheet.add(
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.title"), GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.title"),
Contact.TITLE); Contact.TITLE);
sheet.add(
GlobalizationUtil.globalize("com.arsdigita.london.contenttypes.ui.name"),
Contact.NAME);
sheet.add( sheet.add(
ContactGlobalizationUtil.globalize( ContactGlobalizationUtil.globalize(
"com.arsdigita.london.contenttypes.ui.contact_givenname"), "com.arsdigita.london.contenttypes.ui.contact_givenname"),