Win a copy of Head First Android this week in the Android forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Al Hobbs
  • salvin francis

dynamic populating of data

Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Guyz ,

My requirement : I have a form with select and 3 text boxes. When I select a particular option from select. I need to go to action class which will hit the DB and get three strings. These 3 strings has to be populated in the 3 text boxes DYNAMICALLY .

My Problem: ( Myself being new to J2EE will be the first ) I have tried with STRUTS2 and JQUERY (AJAX). The below code will give you an idea what i have tried. My problem is that I have no idea how to send my request to action class and get that response. (with just struts I used member variables for request and taglib for response ;like s:property val)

Java Action Class


My JSP file

Please let me know how i can proceed here.
Posts: 9626
Mac OS X Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Why did you start a new topic when people have already offered help in your previous topic?
Since you are new to Struts 2, you should probably start with some general tutorials so you understand how Struts works. This tutorial is a good one to start with. Only after getting a detailed understanding of Struts, would I throw AJAX into the mix. There's a lot of moving parts in a web application and you have to have them all lined up correctly to get them to work. The more examples you look at, the better off you'll be.
Once you have the basics down, I mentioned the Struts 2 jQuery plugin in your previous topic. It makes jQuery (which is already pretty easy) even easier. Have a look at the examples here and they may help.
    Bookmark Topic Watch Topic
  • New Topic