Now i just wanted to add one thing: when i try only the other method
as stand alone, to check for existing strings in the db i have some
trouble too. I just implement the call to check for existing strings.
If i find some, a message label apear and tells me that. The thing i
wounder now is, why its only pop up when i hit the button a second
time? It seems to me like, it checks for doulbe string but the "if ()"
is getting checked first. So it first says "if (userfind==true)" and
then it checks for the db with the string. But i first do this call:

                getuser.getDefinedUser(vorname.getValue(),
callbackFindUser);


                if (doubleuser == "user found") {
                        message2.setText("user allreay exists");
                        message2.setVisible(true);
                        return;
                }

First the call, then the "if". So why it only seems to work when i hit
the button twice?? Any idea?

On 20 Okt., 09:47, Lothar Kimmeringer <[EMAIL PROTECTED]> wrote:
> Michi_de schrieb:
>
> > Actually i've some problem with my GWT project. I have some textfield
> > and a button. Clickin the button, a method starts and write the string
> > into a mysql database with a servlet. It works wonderfull.
> > Now i wanted some additional features in this method. I want to search
> > the database first, for the string, and if it finds a equal string in
> > my database it should return a error message and NOT put the new
> > string into the database.
>
> Extend the first method by throwing an exception in that case.
> That way you don't need two calls for more or less the same
> thing. You can throw your own exception by extenting it from
> SerializableException.
>
> Regards, Lothar

Thanks for the fast reply.
So u think i should use only one call? Can u give me some help with
this exception thingy please? Where exactly to throw an exception? It
seems rather complex to me, this solution :P ;)
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to