|
Re: Validate text in TextCellEditor after input [message #22509 is a reply to message #22419] |
Wed, 22 July 2009 12:34 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bjoern.bjoernfischer.de
Hello Andrei,
maybe you could attach a FocusListener to the TextCellEditor (more
specific: to the Text control you can obtain via
TextCellEditor#getControl()). Then your validation could be executed
when the editor looses its focus.
Regards,
Björn
Andrei Serea schrieb:
> Hello all,
>
> Here is my problem: I have a table with a celleditor (textcelleditor)
> attached to one of its columns. To this textcelleditor I have also attached
> an ICellEditorValidator just to validate the user input.
> The problem is that the validator is called when the editor is activated
> (when the user first clicks the cell) and not after it presses enter to
> finish editing. In other words, the data validated is that which already
> existed at the start of the editing process and not the new data just
> entered.
>
> Any clues to where I am failing?
>
> Thank you!
> Andrei.
>
>
|
|
|
|
Re: Validate text in TextCellEditor after input [message #22681 is a reply to message #22638] |
Wed, 22 July 2009 13:22 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: bjoern.bjoernfischer.de
As far as I can see the cell validator is called on every change in the
cell (and this includes activation). This behaviour might be good if you
want to for example filter for forbidden characters or something like that.
I can not say if this is a bug or not, for me it is just a useless
feature. But since you have full control of the underlying Text widget
it is not difficult to work around (you can e.g. also put the
VerifyListener on the Text widget). Maybe that is also a reason why
nobody puts effort on that topic. An easy workaround makes the "bug"
unimportant.
Regards,
Björn
Andrei Serea schrieb:
> Yes, I thought of this and I will probably use this solution.
>
> My question still remains: Why would anyone want the validator to be
> called at the activation (begin of edit) of the cell editor and not at
> the deactivation (end of edit)? I just cannot understand the use of
> this... Maybe someone could help me understand. Or should I look at this
> as a bug?
>
|
|
|
Powered by
FUDForum. Page generated in 0.03192 seconds