Why couldn't you just put a single field (HashMap) called persons that holds a PersonBean (a mother, a father, and a spouse) all keyed off of the useCaseId?

That way you could do something like...

<c:out value="${EditPersonForm.persons.mother.firstName}"/>

Or, if you knew you always needed those 3, just make each a field on the EditPersonForm.

 private PersonBean mother;
 private PersonBean father;
 private PersonBean spouse;

   (with appropriate getters and setters)


then, you can:

<c:out value="${EditPersonForm.mother.firstName}"/>






-- James Mitchell Software Engineer / Open Source Evangelist EdgeTech, Inc. 678.910.8017 AIM: jmitchtx

----- Original Message ----- From: "BERNARDO ANTONIO BUFFA" <[EMAIL PROTECTED]>
To: <dev@struts.apache.org>
Sent: Wednesday, February 02, 2005 3:02 AM
Subject: Wished feature: multiple action instances into same session



Hi,

will the future of Struts/Shale consider the possibility to have more than
an instance of MyAction (or UseCase, or Dialog, ...) per session?

In my last project I need to edit Persons so I had an EditPersonAction.
EditPersonAction was usefull for Creation/Update Person Objects.
The problem was that Person has an mother, father, spouse properties.
I want to be able creating/editing the mother/father/spouse (m/f/s) of
every edited person using the same EditPersonAction, which uses
EditPersonForm.
But struts maintains only one EditPersonForm instance per session.
So I subclassed RequestProcessor who keeps many EditPersonForm instances
and restore the appropiate one into session based on a request parameter
(useCaseId).
Apologize my poor englisch.

Thanks in advance for you time.
Bernardo Antonio Buffa Colomé



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





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



Reply via email to