Aum,

I know what you are talking about.  I end up putting all lists for
select tag in the session.  Otherwise, you will have to reload the list
every time the form submits and when validation error happens.  I'd like
to find out if there are other ways to get around too.

Jane



-----Original Message-----
From: aum strut [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 27, 2008 12:34 PM
To: Struts Users Mailing List
Subject: Calling Action on form load

Hi all,

is it possible to call an action in struts2  everytime when the page get
loaded if yes how it is possible.
my problem is i am using <s:select> tag and using a list to pupulate
this
drop down this list is coming from the action which i m calling before
the
page is being displayed.

the folw is like this:

if usercall for this JSP page instaed to direct user directly  to this
page
i m calling an action which is preaparing a list for the <s:select> tag
and then it is forwarding the user to this page.

Till now eveything is working fine,but when on this page user is
entering
some values in the fields and hitting the submitting button,exception is
being thrown which is saying that:


select', field 'list', name 'code': The requested list key 'ItemCode'
could
not be resolved as a collection/array/map/enumeration/iterator type.
Example: people or people.{name} - [unknown location]

because i thik it is unable to call the action again which is returning
the
list...is theer any way to call that action each time when user is
submitting the value..



any pointer in this regard will be much appriciated.

-aum

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to