From 56d730bd6864a52e5acaa1a48797590de90c95db Mon Sep 17 00:00:00 2001 From: tosmers Date: Fri, 20 Feb 2015 20:17:09 +0000 Subject: [PATCH] [UPDATE] Die Verwendungen der FormValidationException durch die FormProcessExceptions ersetzt und angepasst. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [DELETE] Die Klasse FormValidationException.java gelöscht. git-svn-id: https://svn.libreccm.org/ccm/trunk@3260 8810af33-2d31-482b-a856-94f89814c4df --- .../com/arsdigita/cms/ui/type/CreateType.java | 5 +- .../cms/ui/workflow/TaskFinishForm.java | 5 +- .../src/com/arsdigita/bebop/FormModel.java | 22 +----- .../bebop/FormValidationException.java | 77 ------------------- .../cms/docmgr/ui/DMResources.properties | 2 + .../cms/docmgr/ui/DMResources_en.properties | 2 + .../cms/docmgr/ui/DestinationFolderForm.java | 6 +- .../cms/docmgr/ui/FolderCreateForm.java | 6 +- .../arsdigita/docrepo/DRResources.properties | 5 ++ .../docrepo/DRResources_de.properties | 5 ++ .../docrepo/DRResources_en.properties | 5 ++ .../docrepo/ui/DestinationFolderForm.java | 7 +- .../arsdigita/docrepo/ui/DocrepoBasePage.java | 6 +- .../docrepo/ui/DocsResources.properties | 1 - .../docrepo/ui/FolderCreateForm.java | 6 +- .../docrepo/util/GlobalizationUtil.java | 2 +- .../com/arsdigita/faq/FaqResources.properties | 1 + .../arsdigita/faq/FaqResources_de.properties | 1 + .../arsdigita/faq/FaqResources_en.properties | 1 + .../faq/ui/FaqQuestionEntryForm.java | 6 +- .../permissions/PartyPermissionEdit.java | 6 +- .../permissions/ui/CwResources.properties | 2 +- .../permissions/ui/CwResources_de.properties | 2 +- .../portalserver/ui/admin/PortletAddForm.java | 4 +- 24 files changed, 54 insertions(+), 131 deletions(-) delete mode 100755 ccm-core/src/com/arsdigita/bebop/FormValidationException.java diff --git a/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java b/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java index d476c9b60..901d6cae1 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/type/CreateType.java @@ -21,7 +21,6 @@ package com.arsdigita.cms.ui.type; import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.FormValidationException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.SimpleContainer; @@ -290,8 +289,8 @@ public class CreateType extends CMSForm String qname = parentObjectType.getModel().getName() + "." + name; MetadataRoot root = MetadataRoot.getMetadataRoot(); if (root.getObjectType(qname) != null || root.hasTable(name)) { - throw new FormValidationException(m_name, (String) GlobalizationUtil.globalize("cms.ui.type.duplicate_type", - new Object[]{name}).localize()); + throw new FormProcessException(GlobalizationUtil.globalize( + "cms.ui.type.duplicate_type", new Object[]{name})); } //create a new dynamic object type with diff --git a/ccm-cms/src/com/arsdigita/cms/ui/workflow/TaskFinishForm.java b/ccm-cms/src/com/arsdigita/cms/ui/workflow/TaskFinishForm.java index 5ce2d16d0..81a43c388 100755 --- a/ccm-cms/src/com/arsdigita/cms/ui/workflow/TaskFinishForm.java +++ b/ccm-cms/src/com/arsdigita/cms/ui/workflow/TaskFinishForm.java @@ -19,7 +19,6 @@ package com.arsdigita.cms.ui.workflow; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.FormValidationException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.event.FormInitListener; @@ -159,7 +158,7 @@ public final class TaskFinishForm extends CommentAddForm { task.finish(Web.getWebContext().getUser()); finishedTask = true; } catch (TaskException te) { - throw new FormValidationException(te.toString()); + throw new FormProcessException(te); } } else { s_log.debug("The task is rejected; reenabling dependent " @@ -188,7 +187,7 @@ public final class TaskFinishForm extends CommentAddForm { task.finish(Web.getWebContext().getUser()); finishedTask = true; } catch (TaskException te) { - throw new FormValidationException(te.toString()); + throw new FormProcessException(te); } } if (finishedTask) { diff --git a/ccm-core/src/com/arsdigita/bebop/FormModel.java b/ccm-core/src/com/arsdigita/bebop/FormModel.java index a0eb64dd4..349e23dc0 100755 --- a/ccm-core/src/com/arsdigita/bebop/FormModel.java +++ b/ccm-core/src/com/arsdigita/bebop/FormModel.java @@ -359,16 +359,11 @@ public class FormModel implements Lockable { try { DeveloperSupport.startStage("Bebop Form Process"); fireFormProcess(e); - } catch (FormValidationException fve) { - s_log.debug("A FormValidationException was thrown " + - "while processing the form; storing the " + - "error"); + } catch (FormProcessException fpe) { + s_log.debug("A FormProcessException was thrown while " + + "initializing the form; storing the error", fpe); - if (fve.getName() != null) { - data.addError(fve.getName(), fve.getMessage()); - } else { - data.addError(fve.getMessage()); - } + data.addError("Initialization Aborted: " + fpe.getMessages()); } finally { DeveloperSupport.endStage("Bebop Form Process"); } @@ -383,15 +378,6 @@ public class FormModel implements Lockable { try { DeveloperSupport.startStage("Bebop Form Init"); fireFormInit(e); - } catch (FormValidationException fve) { - s_log.debug("A FormValidationException was thrown while " + - "initializing the form; storing the error"); - - if (fve.getName() == null) { - data.addError(fve.getMessage()); - } else { - data.addError(fve.getName(), fve.getMessage()); - } } catch (FormProcessException fpe) { s_log.debug("A FormProcessException was thrown while " + "initializing the form; storing the error", fpe); diff --git a/ccm-core/src/com/arsdigita/bebop/FormValidationException.java b/ccm-core/src/com/arsdigita/bebop/FormValidationException.java deleted file mode 100755 index ecf962d9c..000000000 --- a/ccm-core/src/com/arsdigita/bebop/FormValidationException.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright (C) 2002-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.bebop; - -import com.arsdigita.bebop.parameters.ParameterModel; -import com.arsdigita.bebop.form.Widget; - -/** - * FormValidationException - * - * @author rhs@mit.edu - * @version $Id: FormValidationException.java 287 2005-02-22 00:29:02Z sskracic $ - */ - -public class FormValidationException extends FormProcessException { - - /** */ - private String m_name = null; - - public FormValidationException(String message) { - super(message); - } - - public FormValidationException(String name, String message) { - super(message); - m_name = name; - } - - public FormValidationException(ParameterModel parameter, String message) { - this(parameter.getName(), message); - } - - public FormValidationException(Widget widget, String message) { - this(widget.getParameterModel(), message); - } - - public FormValidationException(String message, Throwable rootCause) { - super(message, rootCause); - } - - public FormValidationException(String name, String message, - Throwable rootCause) { - super(message, rootCause); - m_name = name; - } - - public FormValidationException(ParameterModel parameter, String message, - Throwable rootCause) { - this(parameter.getName(), message, rootCause); - } - - public FormValidationException(Widget widget, String message, - Throwable rootCause) { - this(widget.getParameterModel(), message, rootCause); - } - - public String getName() { - return m_name; - } - -} diff --git a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources.properties b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources.properties index 5405e9cfb..2efeb1983 100755 --- a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources.properties +++ b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources.properties @@ -96,3 +96,5 @@ ui.folder.deletion_while_not_empty=Folders must be empty before they can be dele ui.error.unexpected=An unexpected error occurred ui.authoring.file_option_null=File option was null ui.unspecified_search_parameters=At least one search parameter must be specified +ui.folder.name_not_unique=A folder with this name already exists +ui.folder.choose_destination=Please choose a destination diff --git a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources_en.properties b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources_en.properties index 5405e9cfb..2efeb1983 100755 --- a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources_en.properties +++ b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DMResources_en.properties @@ -96,3 +96,5 @@ ui.folder.deletion_while_not_empty=Folders must be empty before they can be dele ui.error.unexpected=An unexpected error occurred ui.authoring.file_option_null=File option was null ui.unspecified_search_parameters=At least one search parameter must be specified +ui.folder.name_not_unique=A folder with this name already exists +ui.folder.choose_destination=Please choose a destination diff --git a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DestinationFolderForm.java b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DestinationFolderForm.java index 236eaad7d..105cb4c60 100755 --- a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DestinationFolderForm.java +++ b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/DestinationFolderForm.java @@ -18,7 +18,6 @@ package com.arsdigita.cms.docmgr.ui; import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.Form; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.FormValidationException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.RequestLocal; @@ -34,6 +33,7 @@ import com.arsdigita.cms.docmgr.DocFolder; import com.arsdigita.cms.docmgr.Repository; import com.arsdigita.cms.docmgr.Resource; import com.arsdigita.cms.docmgr.ResourceExistsException; +import com.arsdigita.cms.docmgr.util.GlobalizationUtil; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.domain.DomainCollection; @@ -189,8 +189,8 @@ class DestinationFolderForm extends Form try { String parent = (String) m_radioGroup.getValue(state); if (parent == null) { - throw new FormValidationException - ("Please choose a destination."); + throw new FormProcessException(GlobalizationUtil.globalize( + "ui.folder.choose_destination")); } OID parentOID = new OID(DocFolder.BASE_DATA_OBJECT_TYPE, diff --git a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/FolderCreateForm.java b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/FolderCreateForm.java index 4e47b643b..57bbd53e4 100755 --- a/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/FolderCreateForm.java +++ b/ccm-docmgr/src/com/arsdigita/cms/docmgr/ui/FolderCreateForm.java @@ -24,7 +24,6 @@ import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.Form; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.FormValidationException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.SimpleContainer; @@ -40,6 +39,7 @@ import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.docmgr.DocFolder; import com.arsdigita.cms.docmgr.ResourceExistsException; import com.arsdigita.cms.docmgr.Util; +import com.arsdigita.cms.docmgr.util.GlobalizationUtil; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.kernel.Kernel; import com.arsdigita.kernel.KernelExcursion; @@ -135,8 +135,8 @@ class FolderCreateForm extends Form try { folder.save(); } catch (ResourceExistsException ree) { - throw new FormValidationException - ("A folder with this name already exists."); + throw new FormProcessException(GlobalizationUtil.globalize( + "ui.folder.name_not_unique")); } new KernelExcursion() { diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/DRResources.properties b/ccm-docrepo/src/com/arsdigita/docrepo/DRResources.properties index d4c92439e..44e3a025d 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/DRResources.properties +++ b/ccm-docrepo/src/com/arsdigita/docrepo/DRResources.properties @@ -69,3 +69,8 @@ ui.workspace.search.title=Search ui.workspace.title=Workspace ui.fileinfo.upload.initialversion.description=Initial version ui.portlet.action.newresource=New Document +ui.folder.name_not_unique=A folder with this name already exists +ui.workspace.sign_out=Sign out +ui.admin_view=View of the Admin +ui.user_view=The view of the User +ui.folder.choose_destination=Please choose a destination diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_de.properties b/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_de.properties index 6308a6757..f152387da 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_de.properties +++ b/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_de.properties @@ -69,3 +69,8 @@ ui.workspace.search.title=Search ui.workspace.title=Workspace ui.fileinfo.upload.initialversion.description=Initial version ui.portlet.action.newresource=New Document +ui.folder.name_not_unique=Ein Ordner mit diesem Namen existiert bereits +ui.workspace.sign_out=Abmelden +ui.admin_view=Ansicht des Admin +ui.user_view=Die Ansicht des Benutzers +ui.folder.choose_destination=Bitte w\u00e4hle ein Ziel diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_en.properties b/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_en.properties index d4c92439e..44e3a025d 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_en.properties +++ b/ccm-docrepo/src/com/arsdigita/docrepo/DRResources_en.properties @@ -69,3 +69,8 @@ ui.workspace.search.title=Search ui.workspace.title=Workspace ui.fileinfo.upload.initialversion.description=Initial version ui.portlet.action.newresource=New Document +ui.folder.name_not_unique=A folder with this name already exists +ui.workspace.sign_out=Sign out +ui.admin_view=View of the Admin +ui.user_view=The view of the User +ui.folder.choose_destination=Please choose a destination diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/ui/DestinationFolderForm.java b/ccm-docrepo/src/com/arsdigita/docrepo/ui/DestinationFolderForm.java index 6eb0e348f..8235f5fe6 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/ui/DestinationFolderForm.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/ui/DestinationFolderForm.java @@ -21,7 +21,6 @@ package com.arsdigita.docrepo.ui; import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.Form; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.FormValidationException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.RequestLocal; @@ -37,6 +36,7 @@ import com.arsdigita.docrepo.Folder; import com.arsdigita.docrepo.Repository; import com.arsdigita.docrepo.ResourceImpl; import com.arsdigita.docrepo.Util; +import com.arsdigita.docrepo.util.GlobalizationUtil; import com.arsdigita.domain.DataObjectNotFoundException; import com.arsdigita.domain.DomainObjectFactory; import com.arsdigita.kernel.Kernel; @@ -143,9 +143,8 @@ class DestinationFolderForm extends Form try { String parent = (String) m_radioGroup.getValue(state); if (parent == null) { - throw new FormValidationException( - "Please choose a destination." - ); + throw new FormProcessException(GlobalizationUtil.globalize( + "ui.folder.choose_destination")); } OID parentOID = new OID(ResourceImpl.BASE_DATA_OBJECT_TYPE, diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocrepoBasePage.java b/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocrepoBasePage.java index 1aee29cea..1790dace9 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocrepoBasePage.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocrepoBasePage.java @@ -179,7 +179,7 @@ class DocrepoBasePage extends Page { } protected void buildGlobal(Container global) { - Link link = new Link( new Label(GlobalizationUtil.globalize("cw.workspace.sign_out")), "/register/logout"); + Link link = new Link( new Label(GlobalizationUtil.globalize("ui.workspace.sign_out")), "/register/logout"); link.setClassAttr("signoutLink"); @@ -190,12 +190,12 @@ class DocrepoBasePage extends Page { if (m_view != null) { if (m_view.equals("user")) { m_viewLink = new Link - ( new Label(GlobalizationUtil.globalize("cw.doc.ui.admin_view")), "./admin/index.jsp") { + ( new Label(GlobalizationUtil.globalize("ui.admin_view")), "./admin/index.jsp") { public boolean isVisible(PageState ps) { return userIsAdmin(ps); }}; } else if (m_view.equals("admin")) { - m_viewLink = new Link( new Label(GlobalizationUtil.globalize("cw.doc.ui.user_view")), "../index.jsp"); + m_viewLink = new Link( new Label(GlobalizationUtil.globalize("ui.user_view")), "../index.jsp"); } } diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocsResources.properties b/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocsResources.properties index 3cfca07f0..e69de29bb 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocsResources.properties +++ b/ccm-docrepo/src/com/arsdigita/docrepo/ui/DocsResources.properties @@ -1 +0,0 @@ -cw.docs.ui.=    diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/ui/FolderCreateForm.java b/ccm-docrepo/src/com/arsdigita/docrepo/ui/FolderCreateForm.java index e05c198ec..7774f015c 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/ui/FolderCreateForm.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/ui/FolderCreateForm.java @@ -25,7 +25,6 @@ import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.Form; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.FormValidationException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.SimpleContainer; @@ -53,6 +52,7 @@ import com.arsdigita.docrepo.Util; import com.arsdigita.docrepo.Folder; import com.arsdigita.docrepo.ResourceExistsException; import com.arsdigita.docrepo.InvalidNameException; +import com.arsdigita.docrepo.util.GlobalizationUtil; import java.math.BigDecimal; import javax.servlet.http.HttpServletRequest; @@ -147,8 +147,8 @@ class FolderCreateForm extends Form try { folder.save(); } catch (ResourceExistsException ree) { - throw new FormValidationException - ("A folder with this name already exists."); + throw new FormProcessException(GlobalizationUtil.globalize( + "ui.folder.name_not_unique")); } new KernelExcursion() { diff --git a/ccm-docrepo/src/com/arsdigita/docrepo/util/GlobalizationUtil.java b/ccm-docrepo/src/com/arsdigita/docrepo/util/GlobalizationUtil.java index 7b5ca401f..23077049c 100644 --- a/ccm-docrepo/src/com/arsdigita/docrepo/util/GlobalizationUtil.java +++ b/ccm-docrepo/src/com/arsdigita/docrepo/util/GlobalizationUtil.java @@ -34,7 +34,7 @@ import com.arsdigita.globalization.GlobalizedMessage; public class GlobalizationUtil implements Globalized { private static final String BUNDLE_NAME = - "com.arsdigita.docrepo.ui.DocsResources"; + "com.arsdigita.docrepo.DRResources"; public static GlobalizedMessage globalize(String key) { return new GlobalizedMessage(key, BUNDLE_NAME); diff --git a/ccm-faq/src/com/arsdigita/faq/FaqResources.properties b/ccm-faq/src/com/arsdigita/faq/FaqResources.properties index e1569bad1..4fe62412b 100644 --- a/ccm-faq/src/com/arsdigita/faq/FaqResources.properties +++ b/ccm-faq/src/com/arsdigita/faq/FaqResources.properties @@ -6,3 +6,4 @@ cw.faq.ui.text_type=Text Type: cw.faq.ui.user_view=User View cw.faq.ui.admin_view=Administration view faq.ui.admin.no_settings=No settings available +faq.ui.faq.not_found_in_db=The object you are editing cannot be found in the database diff --git a/ccm-faq/src/com/arsdigita/faq/FaqResources_de.properties b/ccm-faq/src/com/arsdigita/faq/FaqResources_de.properties index c88a91659..5ebda804f 100644 --- a/ccm-faq/src/com/arsdigita/faq/FaqResources_de.properties +++ b/ccm-faq/src/com/arsdigita/faq/FaqResources_de.properties @@ -6,3 +6,4 @@ cw.faq.ui.text_type=Text Typ: cw.faq.ui.user_view=Benutzeransicht cw.faq.ui.admin_view=Administrationsansicht faq.ui.admin.no_settings=Keine Einstellungen verf\u00fcgbar +faq.ui.faq.not_found_in_db=Das Object, welches Sie gerade bearbeiten, kann in der Datenbank nicht gefunden werden diff --git a/ccm-faq/src/com/arsdigita/faq/FaqResources_en.properties b/ccm-faq/src/com/arsdigita/faq/FaqResources_en.properties index 27b7729cc..34ba35100 100644 --- a/ccm-faq/src/com/arsdigita/faq/FaqResources_en.properties +++ b/ccm-faq/src/com/arsdigita/faq/FaqResources_en.properties @@ -6,3 +6,4 @@ cw.faq.ui.text_type=Text Type: cw.faq.ui.user_view=User View cw.faq.ui.admin_view=Administration view faq.ui.admin.no_settings= +faq.ui.faq.not_found_in_db=The object you are editing cannot be found in the database diff --git a/ccm-faq/src/com/arsdigita/faq/ui/FaqQuestionEntryForm.java b/ccm-faq/src/com/arsdigita/faq/ui/FaqQuestionEntryForm.java index ae4398318..cf713a27a 100644 --- a/ccm-faq/src/com/arsdigita/faq/ui/FaqQuestionEntryForm.java +++ b/ccm-faq/src/com/arsdigita/faq/ui/FaqQuestionEntryForm.java @@ -28,7 +28,6 @@ import com.arsdigita.bebop.ColumnPanel; import com.arsdigita.bebop.Form; import com.arsdigita.bebop.FormData; import com.arsdigita.bebop.FormProcessException; -import com.arsdigita.bebop.FormValidationException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.PageState; import com.arsdigita.bebop.RequestLocal; @@ -182,9 +181,8 @@ public class FaqQuestionEntryForm extends Form pair = getQAPair(state); if (pair == null) { - throw new FormValidationException - ("The object you are editing cannot be found in the " + - "database."); + throw new FormProcessException(GlobalizationUtil.globalize( + "faq.ui.faq.not_found_in_db")); } pair.setQuestion((String) data.get("question")); diff --git a/ccm-portalserver/src/com/arsdigita/portalserver/permissions/PartyPermissionEdit.java b/ccm-portalserver/src/com/arsdigita/portalserver/permissions/PartyPermissionEdit.java index 7b69222f1..24a32e445 100644 --- a/ccm-portalserver/src/com/arsdigita/portalserver/permissions/PartyPermissionEdit.java +++ b/ccm-portalserver/src/com/arsdigita/portalserver/permissions/PartyPermissionEdit.java @@ -303,10 +303,8 @@ public class PartyPermissionEdit extends CompoundComponent { if (targets.size() == 0) { widgets.setVisible(ps, false); m_cancel.setVisible(ps, true); - throw new FormValidationException( - "There are no objects that this " + - "party can be granted permission on." - ); + throw new FormProcessException(GlobalizationUtil.globalize( + "cw.cw.permissions.no_objects")); } } }); diff --git a/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources.properties b/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources.properties index 28c722cb1..3570eff55 100644 --- a/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources.properties +++ b/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources.properties @@ -1,4 +1,4 @@ -cw.cw.permissions.= +cw.cw.permissions.no_objects=There are no objects that this party can be granted permission on cw.cw.permissions.view_and_manage_specific_permissions=View and Manage Specific Permissions cw.cw.permissions.add_user_or_role=Add User or Role cw.cw.permissions.view_general_permissions=View General Permissions diff --git a/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources_de.properties b/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources_de.properties index 19bec793c..dd602cf4f 100644 --- a/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources_de.properties +++ b/ccm-portalserver/src/com/arsdigita/portalserver/permissions/ui/CwResources_de.properties @@ -1,4 +1,4 @@ -cw.cw.permissions.= +cw.cw.permissions.no_objects=Es gibt keine Objekte, f\u00fcr die dieser Gruppe Berechtigung gew\u00e4hrt werden kann cw.cw.permissions.view_and_manage_specific_permissions=View and Manage Specific Permissions cw.cw.permissions.add_user_or_role=Nutzer oder Rolle hinzuf\u00fcgen cw.cw.permissions.view_general_permissions=View General Permissions diff --git a/ccm-portalserver/src/com/arsdigita/portalserver/ui/admin/PortletAddForm.java b/ccm-portalserver/src/com/arsdigita/portalserver/ui/admin/PortletAddForm.java index ca81e4d90..544799995 100644 --- a/ccm-portalserver/src/com/arsdigita/portalserver/ui/admin/PortletAddForm.java +++ b/ccm-portalserver/src/com/arsdigita/portalserver/ui/admin/PortletAddForm.java @@ -23,7 +23,7 @@ import com.arsdigita.bebop.BoxPanel; import com.arsdigita.bebop.Component; import com.arsdigita.bebop.CompoundComponent; import com.arsdigita.bebop.Form; -import com.arsdigita.bebop.FormValidationException; +import com.arsdigita.bebop.FormProcessException; import com.arsdigita.bebop.Label; import com.arsdigita.bebop.Page; import com.arsdigita.bebop.PageState; @@ -696,7 +696,7 @@ class PortletAddForm extends CompoundComponent { f.addProcessListener(new FormProcessListener() { public void process(FormSectionEvent ev) - throws FormValidationException { + throws FormProcessException { PageState ps = ev.getPageState(); if (next.isSelected(ps)) {