Home » Eclipse Projects » Eclipse Platform » [Databinding] Display error dialog when validation returned error status
| |
Re: [Databinding] Display error dialog when validation returned error status [message #335046 is a reply to message #335042] |
Thu, 19 March 2009 09:33 |
Sebastian Paul Messages: 106 Registered: July 2009 |
Senior Member |
|
|
Hi,
I already tried this and it works, but it has a drawback: After the
dialog was shown and the Text focused again, the user can leave the Text
without any further error dialog. That's not surprising, as the
validation status did not change meanwhile. But in my case, the user
should be trapped until the input has the correct format.
I think this is no good UI, but I have to implement this due to project
requirements :(
Any idea? I thought of setting a stale flag manually, but it does not
seem to be possible.
Sebastian
Matthew Hall wrote:
> Sebastian Paul wrote:
>> Hi,
>> I have to display an error dialog when validation returned an error
>> status. Sure, this only makes sense for Text controls and the FocusOut
>> event. The text control should be focussed when the dialog is closed.
>> What is the recommended way to do that? I tried some different ways,
>> but they all seem ugly.
>>
>> Kind regards, Sebastian
>
> You should add a value change listener to the binding's
> getValidationStatus() observable. When it changes value, show the
> dialog if the current status is an error.
>
> You could call text.setFocus() after the dialog closes in your value
> change listener. Be careful with this though, it is possible to
> accidentally trap the user in a field with no way to correct the problem.
>
> Matthew
|
|
| | | |
Goto Forum:
Current Time: Fri Dec 27 12:29:11 GMT 2024
Powered by FUDForum. Page generated in 0.03971 seconds
|