An impass I recently encountered is how to retain the values in a posted form. Here is what I am trying to do: I have a form which acts as a data-entry form, but it also allows the user to narrow down valid entries based on his previous input (kind of like a search form on www.autotrader.com). So everytime the user selects a value on a drop-down(says Acura), I post the form to a servlet, which hits the database and narrows down the other dropdowns (for example, all the Acura Models) filtering, and forward back to the same form. How do I make it so that the values entered in any text input fields are retained? Thanks in advance...
From what I understand, ( applying the mvc pattern)I would prefer to have a bean that maps the information from the form. For eg: when a make information of a car(acura) is supplied, the servlet populates the bean with information, queries the database, retrieves model information for the car( acura models), populate the bean with this information, and then use the bean while displaying the form with the additional information. I hope the pattern applies to your problem.
Joined: Jun 13, 2001