But why to take all the effort?I mean then the struts auto population will not 
work.Also as all the parameters will still be as hidden parameter(but just one), you 
do not even gain any performance benefit.You end up generating more traffic due to XML 
markup.So is there any other benefit of this XML approach? I may have missed it:-((
The advantage of hidden parameter is that the hidden parameters will be auto populated 
in the formBean.

And there is one openSource implementation for the workFlow situation as mentioned in 
my previous mail.




-----Original Message-----
From: Eric Bariaux [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 22, 2004 5:32 PM
To: 'Struts Users Mailing List'
Subject: RE: Wishing I could use multiple ActionForms...


Just one trick/hack I used in the past for such a situation.
Instead of having a bunch of hidden parameters to hold the values, I
marshall my form bean(s) or some other value object containing the
information I want to keep to an XML format. I then put that XML into
one hidden field.
I have a generic marshall/unmarshall mechanism in a parent action class
that simplifies coding a bit.
It is far from perfect though, as you need to think about this "storage"
hidden fields in all your actions/actionforms/html forms/... of the
given "workflow scope".
Anyway, not the most elegant way to do it but it can come in handy from
time to time.

If you want to avoid storing the whole XML in the page, then you need
some more "intelligent" mechanism where you store an id as the hidden
field and an in memory cache that you manages. But then you need to
clear the cache, ... so it becomes the whole "workflow scope" you're
referring to. And I don't know of any free implementation of this.

Eric.

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 22, 2004 9:35 AM
> To: [EMAIL PROTECTED]
> Subject: RE: Wishing I could use multiple ActionForms...
> 
> Hi,
> If the data on first 2 pages is not very large, I will go for using
hidden
> parameters to pass it to the third jsp.
> 
> I see a couple of problems with the session approach.First and
foremost,
> there is no guaranteed way of clearing the from session as the in a
> typical web application uyer can jump to any URL(any other link on the
> page or menu bar for example.).So if you are developing a fairly large
> application/an application with fairly high traffic, keeping session
to
> minimum can be a requirement.
> I think this is a generic problem we all face for a typical web
> application where in we need to preserve data for some scope other
than
> request or session(workflow scope ).And unfortunately struts does not
> provide any builtin mechanism for this.So may be we need to have a
> mechanism where in we can say that a group of actions belong to a
workflow
> and so any data(actionFOrms)are preserved for this scope only by the
> framwwork.If the user jumps to another URL,he leaves the workflow
scope
> and hence it should be automatically cleared.
> 
> We were using the workflow extension from livingLogic(an opensource
> implementation)for such problems,mainly implementing workflow
> situations.may be what you need is not exactly workflow but just the
> workflow scope part of it.
> You can have a look at it on the following URL.
> http://www.livinglogic.de/Struts/description.html
> 
> any ideas if anything like this is already being implemented or is
being
> planned in next struts version?
> 
> regards,
> Shirish
> 
> -----Original Message-----
> From: Wendy Smoak [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, January 21, 2004 11:45 PM
> To: Struts Users Mailing List
> Subject: RE: Wishing I could use multiple ActionForms...
> 
> 
> > Finally, my question:  How do I retain the data entered on
> > the first two pages and contained in the first ActionForm?
> 
> Put it in session scope and take care not to reset the fields
> prematurely.
> 
> --
> Wendy Smoak
> Application Systems Analyst, Sr.
> ASU IA Information Resources Management
> 
> ---------------------------------------------------------------------
> 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]


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

Reply via email to