I am using struts, in my jsp page I have options menu where the value is selected depending on the database value, but the value in the database can be any some new value all the time. How should I make a new list then.
For ex: Let's assume there is a field in database: officeCodes having values from 1 through 10.
Now a new value 11 has been added to officeCodes, how should I update the list. The only code I have is as follows:
instead of using html ption, use html ptions which uses a collection to generate the dropdowns. each time the page is displayed, go back to the database to get the list and put it into the request scope.
you can put the list in the session scope if you don't mind the dropdowns not updated when the user has not established a new session.
-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
Joined: Sep 27, 2005
Thanks for the reply. Is it possible for you to send me a sample code on html ptions and give a brief explanation. I really appreciate for your time.