Struts ActionForm and View's initialization

A

alanmiles100

If I want to initialize my view only once with initial values,
where should I do it?

ActionForm's reset-method seems not to be the right place because it is
called every time if the view has e.g. a submit button. Action class
seems to be called too late. Where should I handle first initialization
of the view? Can anyone please tell me,

Cheers!
 
S

shawnews

If I want to initialize my view only once with initial values,
where should I do it?

ActionForm's reset-method seems not to be the right place because it is
called every time if the view has e.g. a submit button. Action class
seems to be called too late. Where should I handle first initialization
of the view? Can anyone please tell me,

Cheers!

My preferred method is to use an initializing action. Set the values in the
form bean, save to the request, and forward to your view
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,186
Members
46,740
Latest member
JudsonFrie

Latest Threads

Top