Fehler #2400 FormprocessException, modul ccm-cms PART I
git-svn-id: https://svn.libreccm.org/ccm/trunk@3139 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
578995ebcb
commit
1cfc7d7648
|
|
@ -1085,3 +1085,4 @@ cms.ui.contentcenter.section_hint=All content items are organized in one or more
|
||||||
cms.ui.contentcenter.location=Location
|
cms.ui.contentcenter.location=Location
|
||||||
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
||||||
cms.ui.contentcenter.action_hint=If activated displays a form for each content section to create an object of a given type (configurable) in the root of the given content section. The list of available types retrieved for each content section. Administrators will disable this option in order to prevent disorganizing the root directory.
|
cms.ui.contentcenter.action_hint=If activated displays a form for each content section to create an object of a given type (configurable) in the root of the given content section. The list of available types retrieved for each content section. Administrators will disable this option in order to prevent disorganizing the root directory.
|
||||||
|
cms.ui.property_already_exist=The following Property already exists:
|
||||||
|
|
|
||||||
|
|
@ -1079,3 +1079,4 @@ cms.ui.contentcenter.section_hint=All documents are organized in one or more con
|
||||||
cms.ui.contentcenter.location=Ort
|
cms.ui.contentcenter.location=Ort
|
||||||
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
||||||
cms.ui.contentcenter.action_hint=Falls aktiv wird ein Formular angezeigt, um im ROOT Verzeichnis der entsprechenden Sektion ein neues Dokument anzulegen. Administratoren deaktivieren diese Option, um das ROOT Verzeichnis nicht zu \u00fcberfrachten.
|
cms.ui.contentcenter.action_hint=Falls aktiv wird ein Formular angezeigt, um im ROOT Verzeichnis der entsprechenden Sektion ein neues Dokument anzulegen. Administratoren deaktivieren diese Option, um das ROOT Verzeichnis nicht zu \u00fcberfrachten.
|
||||||
|
cms.ui.property_already_exist=Das folgende Objekt existiert bereits:
|
||||||
|
|
|
||||||
|
|
@ -122,3 +122,4 @@ cms.ui.contentcenter.section_hint=All content items are organized in one or more
|
||||||
cms.ui.contentcenter.location=Location
|
cms.ui.contentcenter.location=Location
|
||||||
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
||||||
cms.ui.contentcenter.action_hint=If activated displays a form for each content section to create an object of a given type (configurable) in the root of the given content section. The list of available types retrieved for each content section. Administrators will disable this option in order to prevent disorganizing the root directory.
|
cms.ui.contentcenter.action_hint=If activated displays a form for each content section to create an object of a given type (configurable) in the root of the given content section. The list of available types retrieved for each content section. Administrators will disable this option in order to prevent disorganizing the root directory.
|
||||||
|
cms.ui.property_already_exist=The following Property already exists:
|
||||||
|
|
|
||||||
|
|
@ -591,3 +591,4 @@ cms.ui.contentcenter.section_hint=All documents are organized in one or more con
|
||||||
cms.ui.contentcenter.location=TRANSLATE: Location
|
cms.ui.contentcenter.location=TRANSLATE: Location
|
||||||
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
cms.ui.contentcenter.location_hint=In Legacy mode links to public pages.
|
||||||
cms.ui.contentcenter.action_hint=If activated displays a form for each content section to create an object of a given type (configurable) in the root of the given content section. The list of available types retrieved for each content section. Administrators will disable this option in order to prevent disorganizing the root directory.
|
cms.ui.contentcenter.action_hint=If activated displays a form for each content section to create an object of a given type (configurable) in the root of the given content section. The list of available types retrieved for each content section. Administrators will disable this option in order to prevent disorganizing the root directory.
|
||||||
|
cms.ui.property_already_exist=The following Property already exists:
|
||||||
|
|
|
||||||
|
|
@ -385,9 +385,8 @@ public class PageCreateDynamic extends FormSection
|
||||||
|
|
||||||
if(getSaveCancelSection().getCancelButton().isSelected(state)) {
|
if(getSaveCancelSection().getCancelButton().isSelected(state)) {
|
||||||
m_parent.redirectBack(state);
|
m_parent.redirectBack(state);
|
||||||
throw new FormProcessException( (String) GlobalizationUtil
|
throw new FormProcessException(GlobalizationUtil
|
||||||
.globalize("cms.ui.authoring.submission_cancelled")
|
.globalize("cms.ui.authoring.submission_cancelled"));
|
||||||
.localize());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public class EditKit extends Form
|
||||||
throws FormProcessException {
|
throws FormProcessException {
|
||||||
PageState state = event.getPageState();
|
PageState state = event.getPageState();
|
||||||
if ( isCancelled(state) ) {
|
if ( isCancelled(state) ) {
|
||||||
throw new FormProcessException( (String) GlobalizationUtil.globalize("cms.ui.cancel_hit").localize());
|
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.cancel_hit"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -250,7 +250,7 @@ public class CategoryLocalizationForm extends BaseForm {
|
||||||
if (compField.equalsIgnoreCase(title)
|
if (compField.equalsIgnoreCase(title)
|
||||||
&& (m_category == null
|
&& (m_category == null
|
||||||
|| !m_category.getCategory(state).equals(child))) {
|
|| !m_category.getCategory(state).equals(child))) {
|
||||||
throw new FormProcessException(lz("cms.ui.category.name_not_unique"));
|
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.category.name_not_unique"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,7 @@ import com.arsdigita.cms.ItemCollection;
|
||||||
import com.arsdigita.cms.SecurityManager;
|
import com.arsdigita.cms.SecurityManager;
|
||||||
import com.arsdigita.cms.lifecycle.LifecycleDefinition;
|
import com.arsdigita.cms.lifecycle.LifecycleDefinition;
|
||||||
import com.arsdigita.cms.ui.lifecycle.PublishLock;
|
import com.arsdigita.cms.ui.lifecycle.PublishLock;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||||
import com.arsdigita.domain.DomainObjectFactory;
|
import com.arsdigita.domain.DomainObjectFactory;
|
||||||
import com.arsdigita.kernel.ACSObject;
|
import com.arsdigita.kernel.ACSObject;
|
||||||
|
|
@ -627,7 +628,7 @@ public class FolderManipulator extends SimpleContainer implements
|
||||||
|
|
||||||
if (targetSelector.isCancelled(state)) {
|
if (targetSelector.isCancelled(state)) {
|
||||||
reset(state);
|
reset(state);
|
||||||
throw new FormProcessException("cms.ui.folder.cancelled");
|
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.folder.cancelled"));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ import com.arsdigita.cms.lifecycle.LifecycleDefinition;
|
||||||
import com.arsdigita.cms.lifecycle.LifecycleDefinitionCollection;
|
import com.arsdigita.cms.lifecycle.LifecycleDefinitionCollection;
|
||||||
import com.arsdigita.cms.ui.BaseForm;
|
import com.arsdigita.cms.ui.BaseForm;
|
||||||
import com.arsdigita.cms.ui.FormSecurityListener;
|
import com.arsdigita.cms.ui.FormSecurityListener;
|
||||||
|
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||||
import com.arsdigita.globalization.GlobalizedMessage;
|
import com.arsdigita.globalization.GlobalizedMessage;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
|
|
@ -100,7 +101,7 @@ class BaseLifecycleForm extends BaseForm {
|
||||||
definitions.close();
|
definitions.close();
|
||||||
|
|
||||||
throw new FormProcessException
|
throw new FormProcessException
|
||||||
(lz("cms.ui.lifecycle.name_not_unique"));
|
(GlobalizationUtil.globalize("cms.ui.lifecycle.name_not_unique"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,8 @@ import javax.servlet.http.HttpServletRequest;
|
||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>A form to select and apply a lifecycle to a content item.</p>
|
* <p>
|
||||||
|
* A form to select and apply a lifecycle to a content item.</p>
|
||||||
*
|
*
|
||||||
* @author Michael Pih
|
* @author Michael Pih
|
||||||
* @author Xixi D'moon <xdmoon@redhat.com>
|
* @author Xixi D'moon <xdmoon@redhat.com>
|
||||||
|
|
@ -96,8 +97,8 @@ import org.apache.log4j.Logger;
|
||||||
*/
|
*/
|
||||||
class ItemLifecycleSelectForm extends BaseForm {
|
class ItemLifecycleSelectForm extends BaseForm {
|
||||||
|
|
||||||
private static final Logger s_log =
|
private static final Logger s_log
|
||||||
Logger.getLogger(ItemLifecycleSelectForm.class);
|
= Logger.getLogger(ItemLifecycleSelectForm.class);
|
||||||
private final static String LIFECYCLE = "lifecycle";
|
private final static String LIFECYCLE = "lifecycle";
|
||||||
private final static String START_DATE = "start_date";
|
private final static String START_DATE = "start_date";
|
||||||
private final static String END_DATE = "end_date";
|
private final static String END_DATE = "end_date";
|
||||||
|
|
@ -840,7 +841,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
||||||
|
|
||||||
final Integer startHour = (Integer) m_startHour.getValue(state);
|
final Integer startHour = (Integer) m_startHour.getValue(state);
|
||||||
if (startHour == null) {
|
if (startHour == null) {
|
||||||
throw new FormProcessException(lz(
|
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||||
"cms.ui.item.start_time_incomplete"));
|
"cms.ui.item.start_time_incomplete"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -854,7 +855,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
||||||
java.util.Date startDate = (java.util.Date) m_startDate.getValue(
|
java.util.Date startDate = (java.util.Date) m_startDate.getValue(
|
||||||
state);
|
state);
|
||||||
if (startDate == null) {
|
if (startDate == null) {
|
||||||
throw new FormProcessException(lz(
|
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||||
"cms.ui.item.lifecycle.start_date_invalid"));
|
"cms.ui.item.lifecycle.start_date_invalid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -887,7 +888,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
||||||
cStart.set(Calendar.MILLISECOND, cNow.get(Calendar.MILLISECOND));
|
cStart.set(Calendar.MILLISECOND, cNow.get(Calendar.MILLISECOND));
|
||||||
|
|
||||||
if (cNow.after(cStart)) {
|
if (cNow.after(cStart)) {
|
||||||
throw new FormProcessException(lz(
|
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||||
"cms.ui.item.lifecycle.start_date_in_past"));
|
"cms.ui.item.lifecycle.start_date_in_past"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -896,7 +897,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
||||||
java.util.Date endDate = (java.util.Date) m_endDate.getValue(state);
|
java.util.Date endDate = (java.util.Date) m_endDate.getValue(state);
|
||||||
|
|
||||||
if (endHour == null && (endMinute != null || endDate != null)) {
|
if (endHour == null && (endMinute != null || endDate != null)) {
|
||||||
throw new FormProcessException(lz(
|
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||||
"cms.ui.item.lifecycle.end_time_incomplete"));
|
"cms.ui.item.lifecycle.end_time_incomplete"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -909,7 +910,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
||||||
Integer endAmpm = (Integer) m_endAmpm.getValue(state);
|
Integer endAmpm = (Integer) m_endAmpm.getValue(state);
|
||||||
|
|
||||||
if (endDate == null && !timeBlank) {
|
if (endDate == null && !timeBlank) {
|
||||||
throw new FormProcessException(lz(
|
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||||
"cms.ui.item.lifecycle.end_date_invalid"));
|
"cms.ui.item.lifecycle.end_date_invalid"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -940,7 +941,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
||||||
|
|
||||||
//check if the end date is prior to the start date
|
//check if the end date is prior to the start date
|
||||||
if (cStart.after(cEnd)) {
|
if (cStart.after(cEnd)) {
|
||||||
throw new FormProcessException(lz(
|
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||||
"cms.ui.item.lifecycle.end_date_before_start_date"));
|
"cms.ui.item.lifecycle.end_date_before_start_date"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -964,11 +965,8 @@ class ItemLifecycleSelectForm extends BaseForm {
|
||||||
// complain if date for notification is before the start date
|
// complain if date for notification is before the start date
|
||||||
if (notificationDate.before(cStart.getTime())) {
|
if (notificationDate.before(cStart.getTime())) {
|
||||||
s_log.debug("notification date is before start date!");
|
s_log.debug("notification date is before start date!");
|
||||||
String errorMessage = (String) GlobalizationUtil.
|
|
||||||
globalize(
|
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.item.notification_period_before_start"));
|
||||||
"cms.ui.item.notification_period_before_start").
|
|
||||||
localize();
|
|
||||||
throw new FormProcessException(errorMessage);
|
|
||||||
} else {
|
} else {
|
||||||
s_log.debug("notification date is after start date, OK");
|
s_log.debug("notification date is after start date, OK");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,6 @@ import com.arsdigita.bebop.event.ActionEvent;
|
||||||
import com.arsdigita.bebop.event.ActionListener;
|
import com.arsdigita.bebop.event.ActionListener;
|
||||||
import com.arsdigita.bebop.event.FormSectionEvent;
|
import com.arsdigita.bebop.event.FormSectionEvent;
|
||||||
import com.arsdigita.bebop.FormProcessException;
|
import com.arsdigita.bebop.FormProcessException;
|
||||||
import com.arsdigita.bebop.form.SingleSelect;
|
|
||||||
import com.arsdigita.bebop.form.TextArea;
|
import com.arsdigita.bebop.form.TextArea;
|
||||||
import com.arsdigita.bebop.form.Option;
|
import com.arsdigita.bebop.form.Option;
|
||||||
import com.arsdigita.bebop.form.SingleSelect;
|
import com.arsdigita.bebop.form.SingleSelect;
|
||||||
|
|
@ -65,12 +64,12 @@ public class TemplateBody extends TextAssetBody {
|
||||||
/**
|
/**
|
||||||
* Construct a new TemplateBody component
|
* Construct a new TemplateBody component
|
||||||
*
|
*
|
||||||
* @param itemModel The {@link ItemSelectionModel} which will
|
* @param itemModel The {@link ItemSelectionModel} which will be responsible
|
||||||
* be responsible for loading the current template
|
* for loading the current template
|
||||||
*
|
*
|
||||||
* @param parent The parent wizard which contains the form. The form
|
* @param parent The parent wizard which contains the form. The form may use
|
||||||
* may use the wizard's methods, such as stepForward and stepBack,
|
* the wizard's methods, such as stepForward and stepBack, in its process
|
||||||
* in its process listener.
|
* listener.
|
||||||
*/
|
*/
|
||||||
public TemplateBody(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
|
public TemplateBody(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
|
||||||
super(itemModel);
|
super(itemModel);
|
||||||
|
|
@ -97,8 +96,8 @@ public class TemplateBody extends TextAssetBody {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected DomainObjectPropertySheet getBodyPropertySheet(ItemSelectionModel assetModel) {
|
protected DomainObjectPropertySheet getBodyPropertySheet(ItemSelectionModel assetModel) {
|
||||||
TextAssetBodyPropertySheet sheet =
|
TextAssetBodyPropertySheet sheet
|
||||||
new TextAssetBodyPropertySheet(assetModel);
|
= new TextAssetBodyPropertySheet(assetModel);
|
||||||
sheet.getColumn(1).setCellRenderer(new TemplateLabelCellRenderer());
|
sheet.getColumn(1).setCellRenderer(new TemplateLabelCellRenderer());
|
||||||
return sheet;
|
return sheet;
|
||||||
}
|
}
|
||||||
|
|
@ -114,8 +113,8 @@ public class TemplateBody extends TextAssetBody {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set additional parameters of a brand new text asset, such as the
|
* Set additional parameters of a brand new text asset, such as the parent
|
||||||
* parent ID, after the asset has been successfully uploaded
|
* ID, after the asset has been successfully uploaded
|
||||||
*
|
*
|
||||||
* @param s the current page state
|
* @param s the current page state
|
||||||
* @param a the new <code>TextAsset</code>
|
* @param a the new <code>TextAsset</code>
|
||||||
|
|
@ -126,15 +125,15 @@ public class TemplateBody extends TextAssetBody {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Adds the options for the mime type select widget
|
* Adds the options for the mime type select widget
|
||||||
**/
|
*
|
||||||
|
*/
|
||||||
protected void setMimeTypeOptions(SingleSelect mimeSelect) {
|
protected void setMimeTypeOptions(SingleSelect mimeSelect) {
|
||||||
Map mimeTypes = Template.SUPPORTED_MIME_TYPES;
|
Map mimeTypes = Template.SUPPORTED_MIME_TYPES;
|
||||||
Iterator keys = mimeTypes.keySet().iterator();
|
Iterator keys = mimeTypes.keySet().iterator();
|
||||||
while (keys.hasNext()) {
|
while (keys.hasNext()) {
|
||||||
String key = (String)keys.next();
|
String key = (String) keys.next();
|
||||||
mimeSelect.addOption
|
mimeSelect.addOption(new Option(key,
|
||||||
(new Option(key,
|
new Label((GlobalizedMessage) mimeTypes.get(key))));
|
||||||
new Label((GlobalizedMessage)mimeTypes.get(key))));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -144,7 +143,7 @@ public class TemplateBody extends TextAssetBody {
|
||||||
s_log.debug("Adding text widgets to " + c);
|
s_log.debug("Adding text widgets to " + c);
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnPanel panel = (ColumnPanel)c.getPanel();
|
ColumnPanel panel = (ColumnPanel) c.getPanel();
|
||||||
panel.setBorder(false);
|
panel.setBorder(false);
|
||||||
panel.setPadColor("#FFFFFF");
|
panel.setPadColor("#FFFFFF");
|
||||||
panel.setColumnWidth(1, "20%");
|
panel.setColumnWidth(1, "20%");
|
||||||
|
|
@ -187,15 +186,12 @@ public class TemplateBody extends TextAssetBody {
|
||||||
mimeWidget.clearOptions();
|
mimeWidget.clearOptions();
|
||||||
setMimeTypeOptions(mimeWidget);
|
setMimeTypeOptions(mimeWidget);
|
||||||
mimeWidget.setDefaultValue(FileUploadSection.GUESS_MIME);
|
mimeWidget.setDefaultValue(FileUploadSection.GUESS_MIME);
|
||||||
mimeWidget.addOption
|
mimeWidget.addOption(new Option(FileUploadSection.GUESS_MIME, new Label(GlobalizationUtil.globalize("cms.ui.authoring.file_upload.auto_detect"))));
|
||||||
(new Option(FileUploadSection.GUESS_MIME, new Label
|
|
||||||
(GlobalizationUtil.globalize
|
|
||||||
("cms.ui.authoring.file_upload.auto_detect"))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the form that is used to upload files. This method can
|
* This is the form that is used to upload files. This method can be used so
|
||||||
* be used so that a subclass can use their own subclass of PageFileForm.
|
* that a subclass can use their own subclass of PageFileForm.
|
||||||
*/
|
*/
|
||||||
protected PageFileForm getPageFileForm() {
|
protected PageFileForm getPageFileForm() {
|
||||||
return new TemplateFileForm();
|
return new TemplateFileForm();
|
||||||
|
|
@ -220,9 +216,7 @@ public class TemplateBody extends TextAssetBody {
|
||||||
|
|
||||||
String mimeType = mime.getMimeType();
|
String mimeType = mime.getMimeType();
|
||||||
if (!Template.SUPPORTED_MIME_TYPES.keySet().contains(mimeType)) {
|
if (!Template.SUPPORTED_MIME_TYPES.keySet().contains(mimeType)) {
|
||||||
throw new FormProcessException
|
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.template_not_supportet"));
|
||||||
("The mime type " + mimeType + "is not one of the " +
|
|
||||||
"supported Template Mime Types");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Template.XSL_MIME_TYPE.equals(mimeType)) {
|
if (Template.XSL_MIME_TYPE.equals(mimeType)) {
|
||||||
|
|
@ -230,9 +224,8 @@ public class TemplateBody extends TextAssetBody {
|
||||||
try {
|
try {
|
||||||
new Document(content);
|
new Document(content);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new FormProcessException
|
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.uploaded_file_not_properly_formatted"
|
||||||
("The uploaded file is not properly formatted XML: " +
|
+ ex.getMessage()));
|
||||||
ex.getMessage());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -244,13 +237,12 @@ public class TemplateBody extends TextAssetBody {
|
||||||
boolean isSelected, Object key,
|
boolean isSelected, Object key,
|
||||||
int row, int column) {
|
int row, int column) {
|
||||||
Label label = null;
|
Label label = null;
|
||||||
if (MIME_TYPE_KEY.equals(key) &&
|
if (MIME_TYPE_KEY.equals(key)
|
||||||
value instanceof TextAsset) {
|
&& value instanceof TextAsset) {
|
||||||
MimeType type = ((TextAsset)value).getMimeType();
|
MimeType type = ((TextAsset) value).getMimeType();
|
||||||
if (type != null) {
|
if (type != null) {
|
||||||
GlobalizedMessage mimeTypeMessage =
|
GlobalizedMessage mimeTypeMessage
|
||||||
(GlobalizedMessage)Template.SUPPORTED_MIME_TYPES.get
|
= (GlobalizedMessage) Template.SUPPORTED_MIME_TYPES.get(type.getMimeType());
|
||||||
(type.getMimeType());
|
|
||||||
if (mimeTypeMessage != null) {
|
if (mimeTypeMessage != null) {
|
||||||
return new Label(mimeTypeMessage, false);
|
return new Label(mimeTypeMessage, false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -290,8 +290,7 @@ public abstract class ElementAddForm extends CMSForm {
|
||||||
|
|
||||||
if ( dot.hasProperty(label) ) {
|
if ( dot.hasProperty(label) ) {
|
||||||
throw new FormProcessException
|
throw new FormProcessException
|
||||||
("A property named \"" + label.toLowerCase() +
|
(GlobalizationUtil.globalize("cms.ui.property_already_exist" + label.toLowerCase()));
|
||||||
"\" already exists.");
|
|
||||||
|
|
||||||
}
|
}
|
||||||
doValidate(event);
|
doValidate(event);
|
||||||
|
|
@ -326,7 +325,7 @@ public abstract class ElementAddForm extends CMSForm {
|
||||||
private final class SubmissionListener implements FormSubmissionListener {
|
private final class SubmissionListener implements FormSubmissionListener {
|
||||||
public void submitted(FormSectionEvent e) throws FormProcessException {
|
public void submitted(FormSectionEvent e) throws FormProcessException {
|
||||||
if (m_cancel.isSelected(e.getPageState())) {
|
if (m_cancel.isSelected(e.getPageState())) {
|
||||||
throw new FormProcessException("cancelled");
|
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.cancelled"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ class TaskAddUser extends SimpleContainer {
|
||||||
|
|
||||||
if (users == null) {
|
if (users == null) {
|
||||||
throw new FormProcessException
|
throw new FormProcessException
|
||||||
(lz("cms.ui.workflow.no_users_were_selected"));
|
((GlobalizationUtil.globalize("cms.ui.workflow.no_users_were_selected"));
|
||||||
} else {
|
} else {
|
||||||
// Add each checked user to the task.
|
// Add each checked user to the task.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue