Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 275391 - [Text] setTextLimit for SWT.MULTI doesn't work
Summary: [Text] setTextLimit for SWT.MULTI doesn't work
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.2   Edit
Hardware: All All
: P3 critical (vote)
Target Milestone: 1.3 M6   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-05-07 18:24 EDT by Howard CLA
Modified: 2010-02-25 15:01 EST (History)
3 users (show)

See Also:


Attachments
fix (15.73 KB, patch)
2010-02-25 12:32 EST, Tim Buschtoens CLA
ruediger.herrmann: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Howard CLA 2009-05-07 18:24:57 EDT
Using 1.2 M6 build, tested on IE7 on Win XP.

Code to reproduce:
Text text = new Text(parent, SWT.MULTI);
text.setTextLimit(128);

Yet I can enter as much data as I want. If I remove SWT.MULTI, then setTextLimit() works perfectly.  And of course SWT works.

This is a severe issue for our software due to needing to limit the amount of data users can enter to correspond to database limits.  It is a pain to hunt down all the places that this is breaking in our fairly complex application converted from SWT.
Comment 1 Ivan Furnadjiev CLA 2009-05-08 09:20:06 EDT
This is a bug in qooxdoo. A bug against qooxdoo is opened:
TextArea#maxLength has no effect
http://bugzilla.qooxdoo.org/show_bug.cgi?id=2361
Comment 2 Tim Buschtoens CLA 2010-02-25 12:32:48 EST
Created attachment 160209 [details]
fix

Adds this feature using an input-listener. Since we already had "org.eclipse.rwt.widgets.Text" extending "qx.ui.form.TextField", i added the features from "qx.ui.form.TextArea" (also extends "qx.ui.form.TextField") there instead of changing the native qooxdoo-code. It wasn't much work and this way we now use only one qooxdoo-widget for the text-field. To complete this, we should merge Text.js with TextUtil.js and possibly the different TextLCAs. 

Client-tests updated and enhanced. Server-tests still green. Need to rebuild qx.js to get rid of TextArea.js.
Comment 3 Rüdiger Herrmann CLA 2010-02-25 15:00:19 EST
Applied patch to CVS HEAD