----- Original Message -----
Sent: Wednesday, March 07, 2001 10:00
AM
Subject: RE: Parallel Forms Bean
Instances, does Struts support it
Correct me if i am wrong.... One way to do it would be to give
'request' scope to the form.
In
the Action class, you set the form to a session scope, under a different
key...one for each different service. Make sure that only one kind of Action
can handle one kind of service. i.e for Service A, use Action A and for
Service B use Action B. In your action classes set the scope of
forms to session (using different keys). Also in your
struts-config.xml file, set the scope (for every action) to
request.
cheers,
Amar..
Hello, I am new to Struts.
One thing that is key in making a decision on
weather to use or not to use
Struts is this.
Suppose I have an ActionForm with class type
com.myapp.MyServiceForm.
This would be a form bean that would
represent some sortr of service in an application that is supposed to
control system services.
Is there a way or is Struts able
to distinguish 2 instances of the MyServiceForm , one for
service A and one for Service B.
My interpretation of the the Source Code is
that the ActionFormBeans class only cashes one copy of the form class
keyed off by the logical name of the form.
How would you deal with relating the
aproriate bean to a form when you have multiple instances of the form
bean.... Am i looking at it from the wrong perspective?
Thanks for in info.
Thanks