• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

searching email address

 
sudheer yathagiri kumar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi to all,
i have one search box,with in that enter any mail address(contails @ and dot) shoud authanticate and if available in db show the corresponding user details ..this is the case..
for that how to write exacty query to that...by like oprator..
thanks in advance..
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And how is this question GWT related?
 
sudheer yathagiri kumar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am doing that in GWT
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
GWT is a client side framework. You cannot search/fire DB queries directly from GWT.
You will have to validate the user input mail ID and pass it on to the server side using GWT-RPC or any other method of your choice. On the server side, you will need to put in code, which will search the DB for the mail ID.What are you using for your DB?
 
sudheer yathagiri kumar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yah.i am searching element(se) is passed as a argument to
greetingService.getmobilenumber(se,new AsyncCallback<ArrayList>()
{

@Override
public void onFailure(Throwable caught) {
Window.alert("errror loading database"+caught.getMessage());

}
@Override
public void onSuccess(ArrayList result) {

}
}

i got data as a ArrayList. but while searching for email contains @ and . symbols may not validate or search the email address .... can you help me please ...
thanks
in advance .....
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not really sure what your question is.
Based on what you have posted till now, you already got the DB part solved and you are getting the data back on to the client side. Your problem is identifying which data contains the mail ID. Is this correct?

What is "se"? What does ArrayList result contain? POJOs? Strings?
 
sudheer yathagiri kumar
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yah... 1)can you tell what is POJO ?
2) my query in greetingserviceimpl class is
select Name,Mobileno,PAN,Email from MembersTable where Mobileno like '%"+num+"%' or Name like '"+num+"%' or Email like '+"+num+"%'");
its working for Mobileno and PAN but i cont get records when i am entering email address like(sudheer@gmail.com).
I am enter string like this ramesh@ its take as a string na...
i hope you wiill understand my problem.
thanks in advance..
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yah.. na..

Please UseRealWords

1)can you tell what is POJO ?

POJO stands for Plain Old Java Object

I had asked this before.
What are you using for your DB?
Since you have chosen not to answer, I cannot help you out more on
...but i cont get records when i am entering email address like(sudheer@gmail.com).
The answer to that problem would be more related to what DB your are using.

As a rule of the thumb, when working with GTW-RPC, one would
1) Invoke a RPC method
2) Arguments, if required, can be passed to this method
3) On the server side, query the DB, retrieve results, construct POJO(s) from the result set
4) Return the POJO(s) to the client
5) Process the data as required on the UI
More info here http://code.google.com/webtoolkit/doc/latest/tutorial/RPC.html

I would recommend dropping the GWT part for now. Write a simple DB code, which will query the DB and retrieve the results. Once you have the proper data you require, you can start building the RPC mechanism to return it to the client.

Please note, we have dedicated JDBC and ORM forums which are the correct place to ask DB/ORM related questions.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic