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_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.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_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.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_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.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_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.property_already_exist=The following Property already exists:
|
||||
|
|
|
|||
|
|
@ -385,9 +385,8 @@ public class PageCreateDynamic extends FormSection
|
|||
|
||||
if(getSaveCancelSection().getCancelButton().isSelected(state)) {
|
||||
m_parent.redirectBack(state);
|
||||
throw new FormProcessException( (String) GlobalizationUtil
|
||||
.globalize("cms.ui.authoring.submission_cancelled")
|
||||
.localize());
|
||||
throw new FormProcessException(GlobalizationUtil
|
||||
.globalize("cms.ui.authoring.submission_cancelled"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -92,7 +92,7 @@ public class EditKit extends Form
|
|||
throws FormProcessException {
|
||||
PageState state = event.getPageState();
|
||||
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)
|
||||
&& (m_category == null
|
||||
|| !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.lifecycle.LifecycleDefinition;
|
||||
import com.arsdigita.cms.ui.lifecycle.PublishLock;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import com.arsdigita.domain.DataObjectNotFoundException;
|
||||
import com.arsdigita.domain.DomainObjectFactory;
|
||||
import com.arsdigita.kernel.ACSObject;
|
||||
|
|
@ -627,7 +628,7 @@ public class FolderManipulator extends SimpleContainer implements
|
|||
|
||||
if (targetSelector.isCancelled(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.ui.BaseForm;
|
||||
import com.arsdigita.cms.ui.FormSecurityListener;
|
||||
import com.arsdigita.cms.util.GlobalizationUtil;
|
||||
import com.arsdigita.globalization.GlobalizedMessage;
|
||||
import org.apache.log4j.Logger;
|
||||
|
||||
|
|
@ -100,7 +101,7 @@ class BaseLifecycleForm extends BaseForm {
|
|||
definitions.close();
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* <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 Xixi D'moon <xdmoon@redhat.com>
|
||||
|
|
@ -96,8 +97,8 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
class ItemLifecycleSelectForm extends BaseForm {
|
||||
|
||||
private static final Logger s_log =
|
||||
Logger.getLogger(ItemLifecycleSelectForm.class);
|
||||
private static final Logger s_log
|
||||
= Logger.getLogger(ItemLifecycleSelectForm.class);
|
||||
private final static String LIFECYCLE = "lifecycle";
|
||||
private final static String START_DATE = "start_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);
|
||||
if (startHour == null) {
|
||||
throw new FormProcessException(lz(
|
||||
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||
"cms.ui.item.start_time_incomplete"));
|
||||
}
|
||||
|
||||
|
|
@ -854,7 +855,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
|||
java.util.Date startDate = (java.util.Date) m_startDate.getValue(
|
||||
state);
|
||||
if (startDate == null) {
|
||||
throw new FormProcessException(lz(
|
||||
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||
"cms.ui.item.lifecycle.start_date_invalid"));
|
||||
}
|
||||
|
||||
|
|
@ -887,7 +888,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
|||
cStart.set(Calendar.MILLISECOND, cNow.get(Calendar.MILLISECOND));
|
||||
|
||||
if (cNow.after(cStart)) {
|
||||
throw new FormProcessException(lz(
|
||||
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||
"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);
|
||||
|
||||
if (endHour == null && (endMinute != null || endDate != null)) {
|
||||
throw new FormProcessException(lz(
|
||||
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||
"cms.ui.item.lifecycle.end_time_incomplete"));
|
||||
}
|
||||
|
||||
|
|
@ -909,7 +910,7 @@ class ItemLifecycleSelectForm extends BaseForm {
|
|||
Integer endAmpm = (Integer) m_endAmpm.getValue(state);
|
||||
|
||||
if (endDate == null && !timeBlank) {
|
||||
throw new FormProcessException(lz(
|
||||
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||
"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
|
||||
if (cStart.after(cEnd)) {
|
||||
throw new FormProcessException(lz(
|
||||
throw new FormProcessException(GlobalizationUtil.globalize(
|
||||
"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
|
||||
if (notificationDate.before(cStart.getTime())) {
|
||||
s_log.debug("notification date is before start date!");
|
||||
String errorMessage = (String) GlobalizationUtil.
|
||||
globalize(
|
||||
"cms.ui.item.notification_period_before_start").
|
||||
localize();
|
||||
throw new FormProcessException(errorMessage);
|
||||
|
||||
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.item.notification_period_before_start"));
|
||||
} else {
|
||||
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.FormSectionEvent;
|
||||
import com.arsdigita.bebop.FormProcessException;
|
||||
import com.arsdigita.bebop.form.SingleSelect;
|
||||
import com.arsdigita.bebop.form.TextArea;
|
||||
import com.arsdigita.bebop.form.Option;
|
||||
import com.arsdigita.bebop.form.SingleSelect;
|
||||
|
|
@ -65,12 +64,12 @@ public class TemplateBody extends TextAssetBody {
|
|||
/**
|
||||
* Construct a new TemplateBody component
|
||||
*
|
||||
* @param itemModel The {@link ItemSelectionModel} which will
|
||||
* be responsible for loading the current template
|
||||
* @param itemModel The {@link ItemSelectionModel} which will be responsible
|
||||
* for loading the current template
|
||||
*
|
||||
* @param parent The parent wizard which contains the form. The form
|
||||
* may use the wizard's methods, such as stepForward and stepBack,
|
||||
* in its process listener.
|
||||
* @param parent The parent wizard which contains the form. The form may use
|
||||
* the wizard's methods, such as stepForward and stepBack, in its process
|
||||
* listener.
|
||||
*/
|
||||
public TemplateBody(ItemSelectionModel itemModel, AuthoringKitWizard parent) {
|
||||
super(itemModel);
|
||||
|
|
@ -97,8 +96,8 @@ public class TemplateBody extends TextAssetBody {
|
|||
}
|
||||
|
||||
protected DomainObjectPropertySheet getBodyPropertySheet(ItemSelectionModel assetModel) {
|
||||
TextAssetBodyPropertySheet sheet =
|
||||
new TextAssetBodyPropertySheet(assetModel);
|
||||
TextAssetBodyPropertySheet sheet
|
||||
= new TextAssetBodyPropertySheet(assetModel);
|
||||
sheet.getColumn(1).setCellRenderer(new TemplateLabelCellRenderer());
|
||||
return sheet;
|
||||
}
|
||||
|
|
@ -114,8 +113,8 @@ public class TemplateBody extends TextAssetBody {
|
|||
}
|
||||
|
||||
/**
|
||||
* Set additional parameters of a brand new text asset, such as the
|
||||
* parent ID, after the asset has been successfully uploaded
|
||||
* Set additional parameters of a brand new text asset, such as the parent
|
||||
* ID, after the asset has been successfully uploaded
|
||||
*
|
||||
* @param s the current page state
|
||||
* @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
|
||||
**/
|
||||
*
|
||||
*/
|
||||
protected void setMimeTypeOptions(SingleSelect mimeSelect) {
|
||||
Map mimeTypes = Template.SUPPORTED_MIME_TYPES;
|
||||
Iterator keys = mimeTypes.keySet().iterator();
|
||||
while (keys.hasNext()) {
|
||||
String key = (String)keys.next();
|
||||
mimeSelect.addOption
|
||||
(new Option(key,
|
||||
new Label((GlobalizedMessage)mimeTypes.get(key))));
|
||||
String key = (String) keys.next();
|
||||
mimeSelect.addOption(new Option(key,
|
||||
new Label((GlobalizedMessage) mimeTypes.get(key))));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -144,7 +143,7 @@ public class TemplateBody extends TextAssetBody {
|
|||
s_log.debug("Adding text widgets to " + c);
|
||||
}
|
||||
|
||||
ColumnPanel panel = (ColumnPanel)c.getPanel();
|
||||
ColumnPanel panel = (ColumnPanel) c.getPanel();
|
||||
panel.setBorder(false);
|
||||
panel.setPadColor("#FFFFFF");
|
||||
panel.setColumnWidth(1, "20%");
|
||||
|
|
@ -187,15 +186,12 @@ public class TemplateBody extends TextAssetBody {
|
|||
mimeWidget.clearOptions();
|
||||
setMimeTypeOptions(mimeWidget);
|
||||
mimeWidget.setDefaultValue(FileUploadSection.GUESS_MIME);
|
||||
mimeWidget.addOption
|
||||
(new Option(FileUploadSection.GUESS_MIME, new Label
|
||||
(GlobalizationUtil.globalize
|
||||
("cms.ui.authoring.file_upload.auto_detect"))));
|
||||
mimeWidget.addOption(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
|
||||
* be used so that a subclass can use their own subclass of PageFileForm.
|
||||
* This is the form that is used to upload files. This method can be used so
|
||||
* that a subclass can use their own subclass of PageFileForm.
|
||||
*/
|
||||
protected PageFileForm getPageFileForm() {
|
||||
return new TemplateFileForm();
|
||||
|
|
@ -220,9 +216,7 @@ public class TemplateBody extends TextAssetBody {
|
|||
|
||||
String mimeType = mime.getMimeType();
|
||||
if (!Template.SUPPORTED_MIME_TYPES.keySet().contains(mimeType)) {
|
||||
throw new FormProcessException
|
||||
("The mime type " + mimeType + "is not one of the " +
|
||||
"supported Template Mime Types");
|
||||
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.template_not_supportet"));
|
||||
}
|
||||
|
||||
if (Template.XSL_MIME_TYPE.equals(mimeType)) {
|
||||
|
|
@ -230,9 +224,8 @@ public class TemplateBody extends TextAssetBody {
|
|||
try {
|
||||
new Document(content);
|
||||
} catch (Exception ex) {
|
||||
throw new FormProcessException
|
||||
("The uploaded file is not properly formatted XML: " +
|
||||
ex.getMessage());
|
||||
throw new FormProcessException(GlobalizationUtil.globalize("cms.ui.uploaded_file_not_properly_formatted"
|
||||
+ ex.getMessage()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -244,13 +237,12 @@ public class TemplateBody extends TextAssetBody {
|
|||
boolean isSelected, Object key,
|
||||
int row, int column) {
|
||||
Label label = null;
|
||||
if (MIME_TYPE_KEY.equals(key) &&
|
||||
value instanceof TextAsset) {
|
||||
MimeType type = ((TextAsset)value).getMimeType();
|
||||
if (MIME_TYPE_KEY.equals(key)
|
||||
&& value instanceof TextAsset) {
|
||||
MimeType type = ((TextAsset) value).getMimeType();
|
||||
if (type != null) {
|
||||
GlobalizedMessage mimeTypeMessage =
|
||||
(GlobalizedMessage)Template.SUPPORTED_MIME_TYPES.get
|
||||
(type.getMimeType());
|
||||
GlobalizedMessage mimeTypeMessage
|
||||
= (GlobalizedMessage) Template.SUPPORTED_MIME_TYPES.get(type.getMimeType());
|
||||
if (mimeTypeMessage != null) {
|
||||
return new Label(mimeTypeMessage, false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -290,8 +290,7 @@ public abstract class ElementAddForm extends CMSForm {
|
|||
|
||||
if ( dot.hasProperty(label) ) {
|
||||
throw new FormProcessException
|
||||
("A property named \"" + label.toLowerCase() +
|
||||
"\" already exists.");
|
||||
(GlobalizationUtil.globalize("cms.ui.property_already_exist" + label.toLowerCase()));
|
||||
|
||||
}
|
||||
doValidate(event);
|
||||
|
|
@ -326,7 +325,7 @@ public abstract class ElementAddForm extends CMSForm {
|
|||
private final class SubmissionListener implements FormSubmissionListener {
|
||||
public void submitted(FormSectionEvent e) throws FormProcessException {
|
||||
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) {
|
||||
throw new FormProcessException
|
||||
(lz("cms.ui.workflow.no_users_were_selected"));
|
||||
((GlobalizationUtil.globalize("cms.ui.workflow.no_users_were_selected"));
|
||||
} else {
|
||||
// Add each checked user to the task.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue