PopupPanel documentation has a lovely example: http://google-web-toolkit.googlecode.com/svn/javadoc/2.0/com/google/gwt/user/client/ui/PopupPanel.html
For positioning it, instead of the roundabout positionAndShow that they use, can probably just do: popup.setPopupPosition(textbox.getAbsoluteLeft() + 10, textbox.getAbsoluteTop() + textBox.getOffsetHeight()); popup.show(); On Apr 9, 11:08 pm, Vik <vik....@gmail.com> wrote: > Hie > > Yes i m using onBlur. > > Right I have same opinion that window alert is too bad. > What I want actually is just marking the component in red and showing a > message somewhere near the component. How can i use a popup below a textbox? > I mean i guess popup comes also like a window only ? > Is there any available example to follow as it will take me good time to do > it all. > > Thankx and Regards > > Vik > Founderwww.sakshum.comwww.sakshum.blogspot.com > > On Sat, Apr 10, 2010 at 12:25 AM, kozura <koz...@gmail.com> wrote: > > What event are you using for activating your validation? onBlur? > > > As for the second question, you have the full power of Java OO > > programming available. So either extend TextBox, or make a Composite > > widget containing a textbox, that encapsulates what you want, maybe > > ValidatingTextBox. Give it a mechanism for generically validating, > > maybe a callback class or whatever, and based on the result add your > > coloring/popups/etc. Then instantiate it for each field, with each > > particular validating callback. BTW I'd avoid alert as it locks your > > browser, requires an extra user click, and isn't very pleasant; maybe > > use a Popup below the textbox instead. > > > On Apr 9, 12:05 pm, Vik <vik....@gmail.com> wrote: > > > Hie > > > > Please have a look at: > >http://1.latest.sakshumweb20.appspot.com/ui/page/DonorRegister.jsp > > > > <http://1.latest.sakshumweb20.appspot.com/ui/page/DonorRegister.jsp>Click > > on > > > the first name field. and then tab out without entering anything. > > > In firefox the field background becomes red but it does not happen in > > > chrome. > > > > Any reasons why the difference in behavior? and how to fix it? > > > > One more thing right now i am showing the error message as a window > > alert. > > > Is there a generic way to mark the component in red and show a error near > > to > > > it? > > > Programmatically doing it will be a lot of effort for all the ui > > components. > > > > Thankx and Regards > > > > Vik > > > Founderwww.sakshum.comwww.sakshum.blogspot.com > > > -- > > 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-tool...@googlegroups.com. > > To unsubscribe from this group, send email to > > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > > . > > For more options, visit this group at > >http://groups.google.com/group/google-web-toolkit?hl=en. -- 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-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.