• 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 ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

dynamic populating of data

 
Greenhorn
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




Struts.xml



My JSP file



Please let me know how i can proceed here.
 
Bartender
Posts: 9626
16
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.
 
I'm thinking about a new battle cry. Maybe "Not in the face! Not in the face!" Any thoughts tiny ad?
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic