Tuesday, November 10, 2009

Changing Validation Icons on the fly?

Hi,

My program contains half a dozen TextFields, which are programatically
updated depending on which row is selected in a table. Each has three
possible states - error, warning or ok.

However, I cannot get the validation icons to update. Here is some
test code I've been using, which simply switches based on an
incremental counter value:
if (i%2 == 0) {
textField.getImages().setInvalid(errorImagePrototype);
textField.markInvalid("Mandatory Field required");
} else {
textField.getImages().setInvalid(warningImagePrototype);
textField.markInvalid("Optional Field not required");
}

However, although the message gets updated, the image doesn't.

Does anyone know how to force the icons to update? I have tried
repainting on the TextField and the containing panel.

Alternatively - should I be approaching this differently?

Many thanks!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate