Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need kind of ActionListeners,keyListeners in servlet

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In swing we have action listeners, key listeners. So its easy if we have many buttons, and also textfied value is dependent on other actions through keylisteners. So, how can i do something similar in servlet, jsp? Suppose there is 3 textfields. value in 2 textfield is enetered by the user and it automatically generates value for the third textfield (quite simple using keylistener in swing) or something like i enter the id number and it gets me the data(offcourse in html page) from db having that id number. How can i do it in Servlet?

 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't see the Servlet or JSP involved in this since they run on the server and the data entry is running on the client. I think you need to look at Javascript within HTML.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65225
95
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All servlets and JSP do is to create the HTML page to be sent to the client. Once the page is sent to the client, they are done with their job on the server and have nothing else to do with the page.

As pointed out, you'll use JavaScript to handle events at the client.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Richard Tookey, Bear Bibeault for your reply.

I am looking forward to javascript. Someone said that smartgwt will help,as its a html,javascript generator. Is it so?? Also, Jquery can help

Which of these(javascript/JQuery,smartgwt) i must use, keeping in mind, that the web application must be completed in within 30days (i am done with analysis of requirement,db designing)?
 
Nam Ha Minh
Ranch Hand
Posts: 504
Eclipse IDE Firefox Browser Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using pure javascript requires more effort than JQuery since JQuery is based on Javascript but it is at a higher level and comes with many cool features.
Smartgwt - I have never used it before.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Nam Ha Minh for your reply. Someone do comment on smartGwt
 
Richard Tookey
Bartender
Posts: 1166
17
Java Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Kunal Lakhani wrote:Thanks Nam Ha Minh for your reply. Someone do comment on smartGwt


Nothing you have described seems to warrant the inclusion of a major third party Javascipt based library such as "Smart GWT" . Your requirement is standard Javascript. There are plenty of online books and tutorial that cover your requirement.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I guess smartgwt will be good for ui too. But, i have started going through javascript. Have started reading Head First Javascript
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic