how to prepare custom tag which will retain values automatically when refreshed
I want to Prepare a one custom tag which will fetch the values from database and display them in a drop down box.
when ever the page( which contains my customtag) refreshed the values which selected before in that tag is not retained.To achieve values retainment automatically, Iam following one method that is when ever page going to refreshed the value selected should put in session.so that session value will be read automatically and selected inside custom tag.
What is the problem in above senario is the devoleper has to put the selected value in session explicitly.But i want to avoid that situation ,so i want to prepare a tag which will take care about retainment of selected values indepently like Struts Tag , where Struts select tag will auotomatically retain the values when page refreshed. p
please help me in preparing the custom tag which behaves indepently like struts tag.