my dog learned polymorphism*
The moose likes Struts and the fly likes Ajax and Struts 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 "Ajax and Struts" Watch "Ajax and Struts" New topic
Author

Ajax and Struts

Kier Heyl
Greenhorn

Joined: Sep 08, 2005
Posts: 1
I'm implementing autofill data by zip codes for a website. They're currently using struts, and it would be nice to tie AJAX into this so that I can auto fill out city and state based on the zip code they entered. There are between 20 and 30 different pages where this will be necisary. I'm still relatively new to struts, but what I'm wondering is am I going to have to create a seperate action mapping for each one of these pages? Or is there a way I can do one action mapping for all of them?
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
struts 2.0, code name 'shale' under development, is working on supports for AJAX. struts/tiles/included struts taglibs generate purely HTML in the end (unless you do client-side validation) so there is no AJAX support. however, auto-population of values dynamically on the client-side can be easily incorporated into struts using the standard javascript calls within form elements' attributes (onchange, onlick, etc.)


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Ajax and Struts
 
Similar Threads
Struts Action and Java Servlet
Best way to begin with struts?
How to integrate AJAX with Struts in a large Application
AJAX and Struts
question about validator framework