I am trying to populate the city and state based on the zip from a DB.I have dwr.xml setup along with web.xml. As i said, the example works fine with plain old HTML but when i try to introduce JSF , it doesn't like the DWR tags to get the value in the onblur. Any help or any example showing some code example is appreciated.
I am not able to post my code.Tried a few times and changed the < etc.
I've noticed that JSF checks the value in the posted form versus the selectItems on the server side. So if for example :
Say for example that stateItems returns as the list of Mexican states. Then through Ajax I change that list to US states. JSF will once again rebuild stateItems, realize that the posted state ID isn't in the select list and create a validation error. You have to tell your managed bean that the list changed too.
It isn't real JSF / AJAX integration, but it has two benefits. One it is simple. Two it lets me test AJAX independent of JSF. Kinda like a view inside a view. Once your done working with those values, they get copied to the hidden fields and posted.
Hey cool! They got a blimp! But I have a tiny ad:
Two software engineers solve most of the world's problems in one K&R sized book