« Return to Thread: Understanding Product Editor Validation

Re: Understanding Product Editor Validation

by gm-mrktc :: Rate this Message:

Reply to Author | View in Thread

Janek,

This is all great stuff and certainly applicable to anyone doing forms
validation in the RCP.  Is there any chance that these classes might be
factored out into a "lighter weight" plugin so that we don't have to include
the entire PDE just to get forms validation?  Alternatively, could they be
folded into one of the other, lower-level UI plugins?

Thanks.

graham

--
Marketcetera Trading Platform
download.run.trade.
www.marketcetera.org

Janek Lasocki-Biczysko wrote:
Hello Martin,

Take a look at IEditorValidationStack#top() and its implementation in
EditorValidationStack#top()
The actual call that you are probably looking for (that slides up the
message) is Form#setMessage(String message, int Severity)
where Form is retreived from an IFormPage (see
EditorValidationStack#getForm(IEditorValidator validator) for an example)

Good luck and feel free to post any follow ups,

P.S If you follow the code we use in PDE (see PDEFormEditor for
IEditorValidationStack and use FormEntry objects for your fields) you
shouldn't have to call setMessage yourself as it will be called
automatically if your FormEntrys are set with IEditorValidators.

Janek Lasocki-Biczysko
IBM,  Eclipse Platform Developer


     

 « Return to Thread: Understanding Product Editor Validation