Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] message feedback in forms

Hi Jody,
my bad I forgot to send you the snippet about forms and message
feedback. Hope I am not too late.


So first you get the message manager from the t6oolkit and scrolled form:

IMessageManager mesgManager = new ManagedForm(toolkit,
scrolledForm).getMessageManager();


You can then add as many messages and warnings as you want. an example
for an error might be:

mesgManager.addMessage(aStringMessageKey, "The input value is wrong
because....", null, IMessageProvider.ERROR, (Control) myWidget);

To clean the thing:
mesgManager.removeAllMessages();


And that should be really all. The form engine handles everything else for you.

Ciao
Andrea


Back to the top