Really, this subclass of RequestProcessor is a runtime for inter usecases
invocation. E.G.: I'm editing an expedient and for adding involved
customers
, I invoke an UC SelectCustomers (using SelectCustomersForm).
The application allows the user to launch many 'windows' (javascripted on
the client).
eg: The user is able to view or edit many expedients
Your solution was in fact my first aproach to the problem, but then I though
that this forces me to:

1) have many 'parallel' HashMaps to keep ALL the ActionForm properties.
(the Expedient, Person, WhatEver being edited, a copy of the same object
for  user 'rollback' of edition and more helping properties).

2) or have only one HashMap with values with ALL the ActionForm properties
each one, (mmmm, or with just my subclass of ActionForm as values)

the second option was exactly the same work that now does this
RequestProcessor.

I'm trying to be simple and hope to express myself clear.
I'm viewing real added value to that feature, and I believe a from zero
coded as Shale could be a good place for this discussion.

>> Apologize my poor englisch. (again)


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



> 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]




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

Reply via email to