From 778bf5cf33bf56ac047dc0efe1736c0833ea4aeb Mon Sep 17 00:00:00 2001 From: fer_luck Date: Thu, 2 Aug 2007 14:11:17 +0000 Subject: [PATCH] [ 1766180 ] Formatted Field input Bug Fields with defined format in the column screen are not working correctly. --- client/src/org/compiere/grid/ed/MDocString.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/org/compiere/grid/ed/MDocString.java b/client/src/org/compiere/grid/ed/MDocString.java index 201d7c797b..50ad084fec 100644 --- a/client/src/org/compiere/grid/ed/MDocString.java +++ b/client/src/org/compiere/grid/ed/MDocString.java @@ -131,9 +131,13 @@ public final class MDocString extends PlainDocument implements CaretListener throws BadLocationException { // Max Length + // Begin - fer_luck @ centuryon + // BugFix [ 1766180 ] Formatted Field input Bug // // @Trifon - [ 1718897 ] User can enter more characters than max size field - if (getLength() + string.length() > m_maxLength) + // if (getLength() + string.length() > m_maxLength) + if (((String)this.getText().replace(" ", "")).length() + string.length() > m_maxLength) return; + // End - fer_luck @ centuryon // We have no Format or inserted not manually (assuming correct Format) if (m_VFormat.length() == 0 || string.length() != 1) {