wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes AJAX with JSF Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "AJAX with JSF" Watch "AJAX with JSF" New topic
Author

AJAX with JSF

Sam Ferns
Greenhorn

Joined: Sep 18, 2005
Posts: 10
Hi Guys,

Plan to implement a country-->state-->city-->location(zip) filter functionality. In other words if a certain country is selected then it should populate the correspondingly stated for the selected country. Request you for some ideas on how such functionality can be achieved using AJAX with JSF.

Thanks a lot.

Cheers,
Sam
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Search this forum or Google for Ajax Double Combo. That should get you started.

Eric
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Eric,
Is this kind of stuff explained in AJAX In Action ?


[My Blog]
All roads lead to JavaRanch
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Look at this link below which has chapter 9 (double combo) from Ajax In Action.

http://searchvb.techtarget.com/tip/1,289483,sid8_gci1156676,00.html

Eric
Gerardo Tasistro
Ranch Hand

Joined: Feb 08, 2005
Posts: 362
Sam here are a couple of tips that have worked with me.

-get DWR http://getahead.ltd.uk/dwr/
-I use hidden fields to get data to and from the JSF
-The actual selects and textinputs are all HTML in a verbatim tag, so I can change them at will as long as I map back to the hidden fields
-I use an onload function to get all data from hidden fields to view
-I use an onsubmit function to get all data from view to hidden fields
-I change the view with javascript and ajax- if I have zips for the country I use selects otherwise the selects are changed to text input
>> UPS EDIT HERE I MEAN country-ZIP-state-city-street >>>
-at least in Mexico zip code locks down state so I do a country-state-city-street approach

Hope that helps
[ March 20, 2006: Message edited by: Gerardo Tasistro ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14688
    
  16

Look at this link below which has chapter 9 (double combo) from Ajax In Action.


Awesome !
Thank you
 
jQuery in Action, 2nd edition
 
subject: AJAX with JSF