Nachtrag Vervollständigen Lokalisierung.
git-svn-id: https://svn.libreccm.org/ccm/trunk@2227 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
04997be566
commit
e5346d6047
|
|
@ -19,11 +19,9 @@
|
||||||
*/
|
*/
|
||||||
package com.arsdigita.cms.contenttypes;
|
package com.arsdigita.cms.contenttypes;
|
||||||
|
|
||||||
import com.arsdigita.cms.ContentType;
|
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.persistence.DataObject;
|
import com.arsdigita.persistence.DataObject;
|
||||||
import com.arsdigita.persistence.OID;
|
import com.arsdigita.persistence.OID;
|
||||||
import com.arsdigita.util.Assert;
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -34,7 +32,8 @@ import java.math.BigDecimal;
|
||||||
public class Person extends GenericPerson {
|
public class Person extends GenericPerson {
|
||||||
|
|
||||||
/** 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.Person";
|
public static final String BASE_DATA_OBJECT_TYPE =
|
||||||
|
"com.arsdigita.cms.contenttypes.Person";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Default constructor. This creates a new (empty) Person.
|
* Default constructor. This creates a new (empty) Person.
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@ import com.arsdigita.cms.ItemSelectionModel;
|
||||||
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.workflow.WorkflowLockedComponentAccess;
|
import com.arsdigita.cms.ui.workflow.WorkflowLockedComponentAccess;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
|
||||||
public class PersonPropertiesStep extends GenericPersonPropertiesStep {
|
public class PersonPropertiesStep extends GenericPersonPropertiesStep {
|
||||||
|
|
||||||
|
|
@ -37,7 +38,8 @@ public class PersonPropertiesStep extends GenericPersonPropertiesStep {
|
||||||
protected void createEditSheet(ItemSelectionModel itemModel) {
|
protected void createEditSheet(ItemSelectionModel itemModel) {
|
||||||
BasicPageForm editSheet;
|
BasicPageForm editSheet;
|
||||||
editSheet = new PersonPropertyForm(itemModel, this);
|
editSheet = new PersonPropertyForm(itemModel, this);
|
||||||
add(EDIT_SHEET_NAME, "Edit",
|
add(EDIT_SHEET_NAME,
|
||||||
|
GlobalizationUtil.globalize("cms.ui.edit"),
|
||||||
new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.
|
new WorkflowLockedComponentAccess(editSheet, itemModel), editSheet.
|
||||||
getSaveCancelSection().getCancelButton());
|
getSaveCancelSection().getCancelButton());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,18 +20,13 @@
|
||||||
package com.arsdigita.cms.contenttypes.ui;
|
package com.arsdigita.cms.contenttypes.ui;
|
||||||
|
|
||||||
import com.arsdigita.bebop.FormData;
|
import com.arsdigita.bebop.FormData;
|
||||||
import com.arsdigita.bebop.Label;
|
|
||||||
import com.arsdigita.bebop.event.FormInitListener;
|
import com.arsdigita.bebop.event.FormInitListener;
|
||||||
import com.arsdigita.bebop.event.FormProcessListener;
|
import com.arsdigita.bebop.event.FormProcessListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.event.FormSubmissionListener;
|
import com.arsdigita.bebop.event.FormSubmissionListener;
|
||||||
import com.arsdigita.bebop.form.TextField;
|
|
||||||
import com.arsdigita.bebop.parameters.ParameterModel;
|
|
||||||
import com.arsdigita.bebop.parameters.StringParameter;
|
|
||||||
import com.arsdigita.cms.ItemSelectionModel;
|
import com.arsdigita.cms.ItemSelectionModel;
|
||||||
import com.arsdigita.cms.contenttypes.Person;
|
import com.arsdigita.cms.contenttypes.Person;
|
||||||
import com.arsdigita.cms.contenttypes.util.PersonGlobalizationUtil;
|
|
||||||
import com.arsdigita.cms.ui.authoring.BasicPageForm;
|
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -39,8 +34,7 @@ import org.apache.log4j.Logger;
|
||||||
*
|
*
|
||||||
* @author: Jens Pelzetter
|
* @author: Jens Pelzetter
|
||||||
*/
|
*/
|
||||||
public class PersonPropertyForm
|
public class PersonPropertyForm extends GenericPersonPropertyForm
|
||||||
extends GenericPersonPropertyForm
|
|
||||||
implements FormProcessListener,
|
implements FormProcessListener,
|
||||||
FormInitListener,
|
FormInitListener,
|
||||||
FormSubmissionListener {
|
FormSubmissionListener {
|
||||||
|
|
@ -66,12 +60,14 @@ public class PersonPropertyForm
|
||||||
super.addWidgets();
|
super.addWidgets();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void init(FormSectionEvent fse) {
|
public void init(FormSectionEvent fse) {
|
||||||
super.init(fse);
|
super.init(fse);
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
Person person = (Person) super.initBasicWidgets(fse);
|
Person person = (Person) super.initBasicWidgets(fse);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
public void process(FormSectionEvent fse) {
|
public void process(FormSectionEvent fse) {
|
||||||
super.process(fse);
|
super.process(fse);
|
||||||
FormData data = fse.getFormData();
|
FormData data = fse.getFormData();
|
||||||
|
|
|
||||||
|
|
@ -978,8 +978,6 @@ cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||||
cms.ui.type.permissions.can_use.no=No
|
cms.ui.type.permissions.can_use.no=No
|
||||||
cms.contenttypes.ui.person.set_alias=Set former name
|
cms.contenttypes.ui.person.set_alias=Set former name
|
||||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||||
cms.contenttypes.ui.person.alias.none=No former name
|
|
||||||
cms.contenttypes.ui.person.alias=Former name
|
|
||||||
cms.contenttypes.ui.person.alias.select=Select former name
|
cms.contenttypes.ui.person.alias.select=Select former name
|
||||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||||
|
|
@ -1011,7 +1009,6 @@ cms.ui.search.create.select_edit=Select item and edit
|
||||||
cms.ui.clear=Clear
|
cms.ui.clear=Clear
|
||||||
cms.ui.item_search.create.folder_missing=No folder selected
|
cms.ui.item_search.create.folder_missing=No folder selected
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=Delete
|
|
||||||
cms.ui.contentcenter.mainpage.search=Search
|
cms.ui.contentcenter.mainpage.search=Search
|
||||||
cms.ui.contentcenter.mainpage.taskssections=Tasks/Sections
|
cms.ui.contentcenter.mainpage.taskssections=Tasks/Sections
|
||||||
cms.ui.contentcenter.section=Section
|
cms.ui.contentcenter.section=Section
|
||||||
|
|
|
||||||
|
|
@ -969,8 +969,6 @@ cms.ui.type.permissions.actions.revoke=Berechtigung widerrufen
|
||||||
cms.ui.type.permissions.can_use.no=Nein
|
cms.ui.type.permissions.can_use.no=Nein
|
||||||
cms.contenttypes.ui.person.set_alias=Fr\u00fcheren Namen setzen
|
cms.contenttypes.ui.person.set_alias=Fr\u00fcheren Namen setzen
|
||||||
cms.contenttypes.ui.person.delete_alias=Fr\u00fcheren Namen entfernen
|
cms.contenttypes.ui.person.delete_alias=Fr\u00fcheren Namen entfernen
|
||||||
cms.contenttypes.ui.person.alias.none=Kein fr\u00fcherer Name
|
|
||||||
cms.contenttypes.ui.person.alias=Fr\u00fcherer Name
|
|
||||||
cms.contenttypes.ui.person.alias.select=Fr\u00fcheren Namen ausw\u00e4hlen
|
cms.contenttypes.ui.person.alias.select=Fr\u00fcheren Namen ausw\u00e4hlen
|
||||||
cms.contenttypes.person.alias.select.wrong_type=Kein Personendatensatz ausgew\u00e4hlt
|
cms.contenttypes.person.alias.select.wrong_type=Kein Personendatensatz ausgew\u00e4hlt
|
||||||
cms.contenttypes.person.alias.select.same_as_person=Der ausgew\u00e4hlte Datensatz ist der gleiche Datensatz wie der aktuelle Datensatz. Alias und Person k\u00f6nnen nicht identisch sein.
|
cms.contenttypes.person.alias.select.same_as_person=Der ausgew\u00e4hlte Datensatz ist der gleiche Datensatz wie der aktuelle Datensatz. Alias und Person k\u00f6nnen nicht identisch sein.
|
||||||
|
|
@ -1003,7 +1001,6 @@ cms.ui.type.minimum_number_of_values_bigger_than_maximum_number_of_values=Maxima
|
||||||
cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Keine negativen Werte erlaubt
|
cms.ui.type.minimummaximum_number_of_values_cannot_be_negative=Keine negativen Werte erlaubt
|
||||||
cms.ui.item_search.create.folder_missing=kein Ordner ausgew\u00e4hlt
|
cms.ui.item_search.create.folder_missing=kein Ordner ausgew\u00e4hlt
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=L\u00f6schen
|
|
||||||
cms.ui.contentcenter.mainpage.search=Suche
|
cms.ui.contentcenter.mainpage.search=Suche
|
||||||
cms.ui.contentcenter.mainpage.taskssections=Aufgaben/Content Sections
|
cms.ui.contentcenter.mainpage.taskssections=Aufgaben/Content Sections
|
||||||
cms.ui.contentcenter.section=Content Section
|
cms.ui.contentcenter.section=Content Section
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,6 @@ cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||||
cms.ui.type.permissions.can_use.no=No
|
cms.ui.type.permissions.can_use.no=No
|
||||||
cms.contenttypes.ui.person.set_alias=Set former name
|
cms.contenttypes.ui.person.set_alias=Set former name
|
||||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||||
cms.contenttypes.ui.person.alias.none=No former name
|
|
||||||
cms.contenttypes.ui.person.alias=Former name
|
|
||||||
cms.contenttypes.ui.person.alias.select=Select former name
|
cms.contenttypes.ui.person.alias.select=Select former name
|
||||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||||
|
|
@ -50,7 +48,6 @@ cms.ui.search.create.select_edit=Select item and edit
|
||||||
cms.ui.clear=Clear
|
cms.ui.clear=Clear
|
||||||
cms.ui.item_search.create.folder_missing=No folder selected
|
cms.ui.item_search.create.folder_missing=No folder selected
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=Delete
|
|
||||||
cms.ui.contentcenter.mainpage.search=Search
|
cms.ui.contentcenter.mainpage.search=Search
|
||||||
cms.ui.contentcenter.mainpage.taskssections=Tasks/Sections
|
cms.ui.contentcenter.mainpage.taskssections=Tasks/Sections
|
||||||
cms.ui.contentcenter.section=Section
|
cms.ui.contentcenter.section=Section
|
||||||
|
|
|
||||||
|
|
@ -498,8 +498,6 @@ cms.ui.type.permissions.actions.revoke=Revoke permission
|
||||||
cms.ui.type.permissions.can_use.no=No
|
cms.ui.type.permissions.can_use.no=No
|
||||||
cms.contenttypes.ui.person.set_alias=Set former name
|
cms.contenttypes.ui.person.set_alias=Set former name
|
||||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||||
cms.contenttypes.ui.person.alias.none=No former name
|
|
||||||
cms.contenttypes.ui.person.alias=Former name
|
|
||||||
cms.contenttypes.ui.person.alias.select=Select former name
|
cms.contenttypes.ui.person.alias.select=Select former name
|
||||||
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
cms.contenttypes.person.alias.select.wrong_type=No person selected
|
||||||
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
cms.contenttypes.person.alias.select.same_as_person=Selected person is the same as the current person. Alias and person can't be identical.
|
||||||
|
|
@ -531,7 +529,6 @@ cms.ui.search.create.select_edit=Select item and edit
|
||||||
cms.ui.clear=
|
cms.ui.clear=
|
||||||
cms.ui.item_search.create.folder_missing=No folder selected
|
cms.ui.item_search.create.folder_missing=No folder selected
|
||||||
cms.ui.images_links=
|
cms.ui.images_links=
|
||||||
cms.contenttypes.ui.person.alias.delete.label=Delete
|
|
||||||
cms.ui.contentcenter.mainpage.search=
|
cms.ui.contentcenter.mainpage.search=
|
||||||
cms.ui.contentcenter.mainpage.taskssections=
|
cms.ui.contentcenter.mainpage.taskssections=
|
||||||
cms.ui.contentcenter.section=
|
cms.ui.contentcenter.section=
|
||||||
|
|
|
||||||
|
|
@ -157,3 +157,5 @@ person.authoring.orgas.title=Organisational Units
|
||||||
cms.contenttypes.ui.person.set_alias=Set former name
|
cms.contenttypes.ui.person.set_alias=Set former name
|
||||||
cms.contenttypes.ui.person.delete_alias=Remove former name
|
cms.contenttypes.ui.person.delete_alias=Remove former name
|
||||||
cms.contenttypes.ui.person.alias.none=No former name
|
cms.contenttypes.ui.person.alias.none=No former name
|
||||||
|
cms.contenttypes.ui.person.alias_title=Former Name
|
||||||
|
cms.contenttypes.ui.person.select_contact=Select a Contact
|
||||||
|
|
|
||||||
|
|
@ -165,4 +165,6 @@ person.ui.orgaunits.columns.type=Typ
|
||||||
person.authoring.orgas.title=Organisationseinheiten
|
person.authoring.orgas.title=Organisationseinheiten
|
||||||
cms.contenttypes.ui.person.set_alias=Fr\u00fcheren Namen setzen
|
cms.contenttypes.ui.person.set_alias=Fr\u00fcheren Namen setzen
|
||||||
cms.contenttypes.ui.person.delete_alias=Fr\u00fcheren Namen entfernen
|
cms.contenttypes.ui.person.delete_alias=Fr\u00fcheren Namen entfernen
|
||||||
cms.contenttypes.ui.person.alias.none=Kein fr\u00fchrer Name
|
cms.contenttypes.ui.person.alias.none=Kein fr\u00fcherer Name
|
||||||
|
cms.contenttypes.ui.person.alias_title=Fr\u00fcherer Name
|
||||||
|
cms.contenttypes.ui.person.select_contact=Einen Kontakt ausw\u00e4hlen
|
||||||
|
|
|
||||||
|
|
@ -66,8 +66,8 @@ public class GenericPersonAliasPropertiesStep extends SimpleEditStep {
|
||||||
this);
|
this);
|
||||||
|
|
||||||
add(SET_ALIAS_SHEET_NAME,
|
add(SET_ALIAS_SHEET_NAME,
|
||||||
(String) ContenttypesGlobalizationUtil.globalize(
|
ContenttypesGlobalizationUtil.globalize(
|
||||||
"cms.contenttypes.ui.person.set_alias").localize(),
|
"cms.contenttypes.ui.person.set_alias"),
|
||||||
new GenericPersonAliasSetWorkflowLockedComponentAccess(setAliasSheet,
|
new GenericPersonAliasSetWorkflowLockedComponentAccess(setAliasSheet,
|
||||||
itemModel),
|
itemModel),
|
||||||
setAliasSheet.getSaveCancelSection().getCancelButton());
|
setAliasSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
@ -79,8 +79,8 @@ public class GenericPersonAliasPropertiesStep extends SimpleEditStep {
|
||||||
itemModel),
|
itemModel),
|
||||||
changeAliasSheet.getSaveCancelSection().getCancelButton());*/
|
changeAliasSheet.getSaveCancelSection().getCancelButton());*/
|
||||||
add(DELETE_ALIAS_SHEET_NAME,
|
add(DELETE_ALIAS_SHEET_NAME,
|
||||||
(String) ContenttypesGlobalizationUtil.globalize(
|
ContenttypesGlobalizationUtil.globalize(
|
||||||
"cms.contenttypes.ui.person.delete_alias").localize(),
|
"cms.contenttypes.ui.person.delete_alias"),
|
||||||
new GenericPersonAliasEditWorkflowLockedComponentAccess(
|
new GenericPersonAliasEditWorkflowLockedComponentAccess(
|
||||||
deleteAliasSheet,
|
deleteAliasSheet,
|
||||||
itemModel),
|
itemModel),
|
||||||
|
|
@ -114,8 +114,8 @@ public class GenericPersonAliasPropertiesStep extends SimpleEditStep {
|
||||||
|
|
||||||
public static Component getEmptyAliasPropertySheet(
|
public static Component getEmptyAliasPropertySheet(
|
||||||
final ItemSelectionModel itemModel) {
|
final ItemSelectionModel itemModel) {
|
||||||
return new Label((String) ContenttypesGlobalizationUtil.globalize(
|
return new Label(ContenttypesGlobalizationUtil.globalize(
|
||||||
"cms.contenttypes.ui.person.alias.none").localize());
|
"cms.contenttypes.ui.person.alias.none"));
|
||||||
}
|
}
|
||||||
|
|
||||||
private class GenericPersonAliasSetWorkflowLockedComponentAccess
|
private class GenericPersonAliasSetWorkflowLockedComponentAccess
|
||||||
|
|
|
||||||
|
|
@ -39,6 +39,7 @@ import com.arsdigita.cms.contenttypes.GenericContactTypeCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericPersonContactCollection;
|
import com.arsdigita.cms.contenttypes.GenericPersonContactCollection;
|
||||||
import com.arsdigita.cms.contenttypes.GenericPerson;
|
import com.arsdigita.cms.contenttypes.GenericPerson;
|
||||||
import com.arsdigita.cms.ui.ItemSearchWidget;
|
import com.arsdigita.cms.ui.ItemSearchWidget;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
|
|
||||||
import com.arsdigita.globalization.GlobalizationHelper;
|
import com.arsdigita.globalization.GlobalizationHelper;
|
||||||
|
|
||||||
|
|
@ -92,7 +93,7 @@ public class GenericPersonContactAddForm extends BasicItemForm {
|
||||||
SingleSelect contactType = new SingleSelect(contactTypeParam);
|
SingleSelect contactType = new SingleSelect(contactTypeParam);
|
||||||
contactType.addValidationListener(new NotNullValidationListener());
|
contactType.addValidationListener(new NotNullValidationListener());
|
||||||
contactType.addOption(new Option("",
|
contactType.addOption(new Option("",
|
||||||
new Label(ContenttypesGlobalizationUtil.
|
new Label(GlobalizationUtil.
|
||||||
globalize("cms.ui.select_one"))));
|
globalize("cms.ui.select_one"))));
|
||||||
|
|
||||||
// Add the Options to the SingleSelect widget
|
// Add the Options to the SingleSelect widget
|
||||||
|
|
|
||||||
|
|
@ -33,16 +33,20 @@ public class GenericPersonContactPropertiesStep extends SimpleEditStep {
|
||||||
/** The name of the editing sheet added to this step */
|
/** The name of the editing sheet added to this step */
|
||||||
private static String ADD_CONTACT_SHEET_NAME = "addContact";
|
private static String ADD_CONTACT_SHEET_NAME = "addContact";
|
||||||
|
|
||||||
public GenericPersonContactPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
|
public GenericPersonContactPropertiesStep(ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent) {
|
||||||
this(itemModel, parent, null);
|
this(itemModel, parent, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public GenericPersonContactPropertiesStep(ItemSelectionModel itemModel, AuthoringKitWizard parent, String prefix) {
|
public GenericPersonContactPropertiesStep(ItemSelectionModel itemModel,
|
||||||
|
AuthoringKitWizard parent,
|
||||||
|
String prefix) {
|
||||||
super(itemModel, parent, prefix);
|
super(itemModel, parent, prefix);
|
||||||
|
|
||||||
BasicItemForm addContactSheet = new GenericPersonContactAddForm(itemModel);
|
BasicItemForm addContactSheet = new GenericPersonContactAddForm(itemModel);
|
||||||
add(ADD_CONTACT_SHEET_NAME,
|
add(ADD_CONTACT_SHEET_NAME,
|
||||||
(String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.add_contact").localize(),
|
ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.person.add_contact"),
|
||||||
new WorkflowLockedComponentAccess(addContactSheet, itemModel),
|
new WorkflowLockedComponentAccess(addContactSheet, itemModel),
|
||||||
addContactSheet.getSaveCancelSection().getCancelButton());
|
addContactSheet.getSaveCancelSection().getCancelButton());
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ 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.ContenttypesGlobalizationUtil;
|
import com.arsdigita.cms.contenttypes.util.ContenttypesGlobalizationUtil;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import java.text.DateFormat;
|
import java.text.DateFormat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -66,12 +67,12 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
||||||
BasicPageForm editBasicSheet = new GenericPersonPropertyForm(itemModel,
|
BasicPageForm editBasicSheet = new GenericPersonPropertyForm(itemModel,
|
||||||
this);
|
this);
|
||||||
basicProperties.add(EDIT_SHEET_NAME,
|
basicProperties.add(EDIT_SHEET_NAME,
|
||||||
(String) ContenttypesGlobalizationUtil.globalize(
|
ContenttypesGlobalizationUtil.globalize(
|
||||||
"cms.contenttypes.ui.person.edit_basic_properties").
|
"cms.contenttypes.ui.person.edit_basic_properties"),
|
||||||
localize(), new WorkflowLockedComponentAccess(editBasicSheet,
|
new WorkflowLockedComponentAccess(editBasicSheet,
|
||||||
itemModel),
|
itemModel),
|
||||||
editBasicSheet.getSaveCancelSection().
|
editBasicSheet.getSaveCancelSection()
|
||||||
getCancelButton());
|
.getCancelButton());
|
||||||
|
|
||||||
/* Set the displayComponent for this step */
|
/* Set the displayComponent for this step */
|
||||||
basicProperties.setDisplayComponent(getGenericPersonPropertySheet(
|
basicProperties.setDisplayComponent(getGenericPersonPropertySheet(
|
||||||
|
|
@ -91,7 +92,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
||||||
new GenericPersonAliasPropertiesStep(
|
new GenericPersonAliasPropertiesStep(
|
||||||
itemModel, parent);
|
itemModel, parent);
|
||||||
segmentedPanel.addSegment(new Label(ContenttypesGlobalizationUtil.
|
segmentedPanel.addSegment(new Label(ContenttypesGlobalizationUtil.
|
||||||
globalize("cms.contenttypes.ui.person.alias")),
|
globalize("cms.contenttypes.ui.person.alias_title")),
|
||||||
aliasStep);
|
aliasStep);
|
||||||
|
|
||||||
/* Sets the composed segmentedPanel as display component */
|
/* Sets the composed segmentedPanel as display component */
|
||||||
|
|
@ -129,7 +130,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
||||||
return DateFormat.getDateInstance(DateFormat.LONG).format(person.
|
return DateFormat.getDateInstance(DateFormat.LONG).format(person.
|
||||||
getBirthdate());
|
getBirthdate());
|
||||||
} else {
|
} else {
|
||||||
return (String) ContenttypesGlobalizationUtil.globalize(
|
return (String) GlobalizationUtil.globalize(
|
||||||
"cms.ui.unknown").localize();
|
"cms.ui.unknown").localize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -146,11 +147,11 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
||||||
//ContentPage page = (ContentPage) item;
|
//ContentPage page = (ContentPage) item;
|
||||||
GenericPerson person = (GenericPerson) item;
|
GenericPerson person = (GenericPerson) item;
|
||||||
if (person.getGender() != null) {
|
if (person.getGender() != null) {
|
||||||
return (String) ContenttypesGlobalizationUtil.globalize("cms.contenttypes.ui.person.gender."
|
|
||||||
+ person.
|
|
||||||
getGender().toLowerCase()).localize();
|
|
||||||
} else {
|
|
||||||
return (String) ContenttypesGlobalizationUtil.globalize(
|
return (String) ContenttypesGlobalizationUtil.globalize(
|
||||||
|
"cms.contenttypes.ui.person.gender."
|
||||||
|
+ person.getGender().toLowerCase()).localize();
|
||||||
|
} else {
|
||||||
|
return (String) GlobalizationUtil.globalize(
|
||||||
"cms.ui.unknown").localize();
|
"cms.ui.unknown").localize();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -160,21 +161,7 @@ public class GenericPersonPropertiesStep extends SimpleEditStep {
|
||||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||||
"cms.ui.authoring.page_launch_date"),
|
"cms.ui.authoring.page_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) ContenttypesGlobalizationUtil.globalize(
|
|
||||||
"cms.ui.unknown").localize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
sheet.add(ContenttypesGlobalizationUtil.globalize(
|
||||||
|
|
|
||||||
|
|
@ -444,6 +444,10 @@ public class DomainObjectPropertySheet extends PropertySheet {
|
||||||
|
|
||||||
/* Determine the default value */
|
/* Determine the default value */
|
||||||
GlobalizedMessage defaultMsg = getDefaultValue();
|
GlobalizedMessage defaultMsg = getDefaultValue();
|
||||||
|
|
||||||
|
if (obj == null) {
|
||||||
|
return (String)defaultMsg.localize();
|
||||||
|
}
|
||||||
Object value = get(obj, attribute);
|
Object value = get(obj, attribute);
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue