|Re: TitleAreaDialog using databinding validation to disable the OK button [message #647768 is a reply to message #647707]
||Sat, 08 January 2011 18:06
| Thomas Schindl
Registered: July 2009
Am 07.01.11 23:18, schrieb Martin:
> Hi Folks,
> I needed to create a few simple dialogs with text fields to allow users
> to input data. Examples are like inputing a Persons details like
> forename, surname, age, address etc. The dialogs just have Ok and
> Cancel buttons.
> Extending TitleAreaDialog I was able to create a dialog laid out as
> required, the validation I've done myself, disabling the OK button for
> erroneous data entries. Now I'd like to use JFace databinding on the
> dialog but have seen that the TitleAreaDialogSupport does not disable
> the OK button when a validation error occurs, it just shows up the error
> I have tried using a WizardDialog with one page and changing the name of
> the Finish button to OK. This works but is surely not the way to go for
> my simple common use case.
> I think it may be possible to extend TitleAreaDialogSupport to also
> disable the OK button. However the lack of OK button disablement on
> validation failure is such an obvious omission from
> TitleAreaDialogSupport that I think I'm missing the point somewhere.
> Maybe I should not be using TitleAreaDialog at all whenever validation
> is needed.
> This is such a common GUI use case I wanted to check that I'm not doing
> more work than necessary.
Powered by FUDForum
. Page generated in 0.02156 seconds