Your form should have a way to initialize the
Form. Some people call an initialize method in the Form class from the
Action class like this:
myPageAction?do
where myPageAction.do calls a method from
myPageForm.java like this:
myForm.initializeVariables();
return
mapping.findForward("refresh");
This would essentially load up the arraylist and
any variables you want from the DB and then return control to the JSP in the
refresh.
Alternately, you could have a method in your JSP
that calls the initializeVariables(); function. That way, you could just
call the JSP (hyperlink to it) and it would call the initializeVariables()
method to load up the arraylist.
Either way, you would put the code listed below in
a method in your Form (ie. initializeVariables(); )
Hope this helps :-)
|
Title: Does anyone have a example to generate a drop down list?
- Does anyone have a example to generate a drop down list? Joyce Tang
- Re: Does anyone have a example to generate a drop down ... Spencer Smith
- RE: Does anyone have a example to generate a drop down ... Joyce Tang
- Spencer Smith