Two Laptop Bag*
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "dynamic populating of data " Watch "dynamic populating of data " New topic
Author

dynamic populating of data

Gazzali Zayn
Greenhorn

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




Struts.xml



My JSP file



Please let me know how i can proceed here.
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8843
    
    7

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.

"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: dynamic populating of data
 
Similar Threads
change event is firing twice
FileUpload - Request empty with IE8
Resetting Values in JSP Page
Passing values to same page
Parsing a text file to an arraylist