|
Re: Databinding Synchronization Doubt [message #333807 is a reply to message #333800] |
Tue, 06 January 2009 21:02 |
Matthew Hall Messages: 368 Registered: July 2009 |
Senior Member |
|
|
Marcelo,
Generally what you want to do is display the validation status somewhere
on the form so that users can correct errors. You should also ensure
that users cannot proceed until any errors have been corrected.
DataBinding directly supports these requirements for instances of
DialogPage (including WizardPage and PreferencePage) and TitleAreaDialog:
(inside WizardPage.createContents() or delegate method)
DataBindingContext dbc = new DataBindingContext();
// create bindings
// Bind wizard page completion and status message to the binding context
WizardPageSupport.create(this, dbc);
Hope this helps,
Matthew
Marcelo Alcantara wrote:
> Hi All,
>
> When we use databinding and we have validation, there is a situation that
> bothers me.
>
> If we set a value to a text field with required validation, the value is
> updated to the model pojo. Fine.
>
> But if we change this value to nothing (selected and del) the validation
> stops the updating process and the value is not updated to the model. But
> the text field is cleared. At this point, on the model we have the previous
> value and on the text field we have nothing.
>
> How do you guys deal with this kind of situation?
>
> I saw on the databinding code that you can change the severity of the status
> from error to warning and it would enable the model update either with
> existing warnings (it just don´t update with the error severity). This is
> the way to do it?
>
> There is a eclipse forms/validation guide somewhere that says how to deal
> with such situations?
>
> Thanks in advance,
>
> Regards,
>
> Marcelo
>
>
|
|
|
Re: Databinding Synchronization Doubt [message #333871 is a reply to message #333807] |
Sun, 11 January 2009 20:30 |
Marcelo Alcantara Messages: 48 Registered: July 2009 |
Member |
|
|
Matthew,
Thanks for your advice.
I am following it.
I will make another post right now about checkbox table set validation. It
would be great if you could give some advice on it.
Regards,
Marcelo
"Matthew Hall" <matthall@woodcraftmill.com> escreveu na mensagem
news:gk0gso$3ba$1@build.eclipse.org...
> Marcelo,
>
> Generally what you want to do is display the validation status somewhere
> on the form so that users can correct errors. You should also ensure that
> users cannot proceed until any errors have been corrected.
>
> DataBinding directly supports these requirements for instances of
> DialogPage (including WizardPage and PreferencePage) and TitleAreaDialog:
>
> (inside WizardPage.createContents() or delegate method)
>
> DataBindingContext dbc = new DataBindingContext();
>
> // create bindings
>
> // Bind wizard page completion and status message to the binding context
> WizardPageSupport.create(this, dbc);
>
> Hope this helps,
>
> Matthew
>
>
> Marcelo Alcantara wrote:
>> Hi All,
>>
>> When we use databinding and we have validation, there is a situation that
>> bothers me.
>>
>> If we set a value to a text field with required validation, the value is
>> updated to the model pojo. Fine.
>>
>> But if we change this value to nothing (selected and del) the validation
>> stops the updating process and the value is not updated to the model. But
>> the text field is cleared. At this point, on the model we have the
>> previous value and on the text field we have nothing.
>>
>> How do you guys deal with this kind of situation?
>>
>> I saw on the databinding code that you can change the severity of the
>> status from error to warning and it would enable the model update either
>> with existing warnings (it just don
|
|
|
Powered by
FUDForum. Page generated in 0.02585 seconds