Don't predefine id's. Generate them dynamically. For example the id may be based on the appservername + port on which it runs.  Since you will be storing all this info in the same session, you can get to any appserver that you want to and start/stop the services (or) whatever you want to do with them.
 
 
 
-----Original Message-----
 
The thing is, i cannont predifine Id's to actions/forms. because that number of instances of servers dynamically grows as the user may create or delete server instances.
 
Also a user may be editing many server info at the same time. (in separate windows but sharing the same sesssion)
 
 
BTW, what is the purpose/difference of:
ActionForm and ActionFormBean?
 
 
 
----- 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..
-----Original Message-----
From: Sarbjit Singh [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 07, 2001 10:50 AM
To: [EMAIL PROTECTED]
Subject: Parallel Forms Bean Instances, does Struts support it

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
 
 
 
 
 

Reply via email to