File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes dynamic populating of data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dynamic populating of data " Watch "dynamic populating of data " New topic

dynamic populating of data

Gazzali Zayn

Joined: Sep 01, 2011
Posts: 4
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.
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

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.

[How To Ask Questions On JavaRanch]
I agree. Here's the link:
subject: dynamic populating of data
It's not a secret anymore!