Thanks, but I need to be able to set the maxLength on the fly. My
customers determine/create the table and they control what the field
lengths are. I never know anything at design time, it all comes
together at run time. I have been trying to tweak the current
celleditor.TextField to see if I can get the correct behavior but no
such luck at this time. What I tried was creating an internal variable
to reference the form.TextField then create a method to set the
maxLength of it but it didn't work.

Thanks,
Jim


On Mon, Apr 27, 2009 at 1:38 AM, Fabian Jakobs <[email protected]> wrote:
> Hi Jim,
>> On textfields, you can set the maximum amount of characters that the
>> user is allowed to enter (setMaxlength), but I don't see any way to
>> set this for a cell in a table. Since this data is going back into a
>> database, I need to restrict the amount of data that is entered. If I
>> have overlooked this let me know.
>>
> You didn't overlook anything. You cannot do it using the cell editor
> API. You can however simply subclass the TextField cell editor and
> override "createCellEditor" like this:
>
>    createCellEditor : function(cellInfo)
>    {
>      var cellEditor = this.base(arguments, cellInfo);
>      cellEditor.setMaxLength(150);
>      return cellEditor;
>    },
>
>
> Best Fabian
>
> --
> Fabian Jakobs
> JavaScript Framework Developer
>
> 1&1 Internet AG - Web Technologies
> Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
> Telefon: +49 721 91374-6784
> [email protected]
>
> Amtsgericht Montabaur / HRB 6484
> Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
> Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
> Mauss, Jan Oetjen
> Aufsichtsratsvorsitzender: Michael Scheeren
>
>
> ------------------------------------------------------------------------------
> Crystal Reports &#45; New Free Runtime and 30 Day Trial
> Check out the new simplified licensign option that enables unlimited
> royalty&#45;free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>

------------------------------------------------------------------------------
Crystal Reports &#45; New Free Runtime and 30 Day Trial
Check out the new simplified licensign option that enables unlimited
royalty&#45;free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to