From 285d05fc4035533c43642163ee7af8856dc3e0df Mon Sep 17 00:00:00 2001 From: jensp Date: Tue, 29 Oct 2013 15:16:35 +0000 Subject: [PATCH] Added StringLengthValidationListeners to the UI of the PressRelease type. git-svn-id: https://svn.libreccm.org/ccm/trunk@2398 8810af33-2d31-482b-a856-94f89814c4df --- .../cms/contenttypes/ui/PressReleasePropertyForm.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertyForm.java b/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertyForm.java index a9a04b26b..b3bb07b6e 100755 --- a/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertyForm.java +++ b/ccm-cms-types-pressrelease/src/com/arsdigita/cms/contenttypes/ui/PressReleasePropertyForm.java @@ -29,6 +29,7 @@ import com.arsdigita.bebop.form.TextArea; import com.arsdigita.cms.ui.CMSDHTMLEditor; import com.arsdigita.bebop.form.TextField; import com.arsdigita.bebop.parameters.ParameterModel; +import com.arsdigita.bebop.parameters.StringLengthValidationListener; import com.arsdigita.bebop.parameters.StringParameter; import com.arsdigita.cms.ItemSelectionModel; import com.arsdigita.cms.contenttypes.PressRelease; @@ -95,6 +96,7 @@ public class PressReleasePropertyForm extends BasicPageForm TextArea summary = new TextArea(summaryParam); summary.setCols(40); summary.setRows(7); + summary.addValidationListener(new StringLengthValidationListener(4000)); add(summary); add(new Label(PressReleaseGlobalizationUtil @@ -103,6 +105,7 @@ public class PressReleasePropertyForm extends BasicPageForm CMSDHTMLEditor contactInfo = new CMSDHTMLEditor(contactInfoParam); contactInfo.setCols(40); contactInfo.setRows(10); + contactInfo.addValidationListener(new StringLengthValidationListener(1000)); add(contactInfo); add(new Label(PressReleaseGlobalizationUtil @@ -111,6 +114,7 @@ public class PressReleasePropertyForm extends BasicPageForm TextField refCode = new TextField(refCodeParam); refCode.setSize(30); refCode.setMaxLength(30); + refCode.addValidationListener(new StringLengthValidationListener(80)); add(refCode); }