You serialize the object sort of. At least for a hacky solution.

That is you add each attribute of it to the request. Lets say I have an
object user I wish to pass and user has firstname and lastname as
whatever. 

Going to actionA:

<html:link href="/actionA.do?user.firstname=xxxx&user.lastname=yyyy"/>

Then in my action I can create a user object by getting all the
user.XXXX parameters and instantiating one. It's a VERY hacky way of
doing things in struts. What you are trying to do is go directly to a
JSP and then go to an action (or at least it sounds like that to me).

A MUCH better solution (and frankly imho the right way to do it in
struts) is to use a dynaActionForm for actionA... 

Instead of going directly to JSPA go to /prepActionA.do (note you CAN
skip this if you do not have to prepopulate the object for presentation.
But I would personally not go directly to a jsp in my application.
Another possibility is to use a DispatchAction and create a method to do
the prepopulation and another to do your processing) If you Already have
a form for ActionA then you can also just add another attribute to the
form. In my example I would add an attribute "user" of type User to the
form. 

In that Action set up the dynaActionForm much like the example code I
sent you showing how to pass objects around in the request. 

The DynaActionForm for my example above would have a property of type
User.

Then in my form I can see and edit those fields using 

<html:text property="user.firstname"/>
etc.

if I do not want the user to edit them, but must pass the object on,
then use
<html:hidden property="user.firstname"/>

I think what you are trying to do can be seen in action using Matt
Raible's (your welcome Matt for the shameless plug :) Equinox framework
where he does something almost exactly like this.

Equinox can be seen at:
https://equinox.dev.java.net/framework-comparison/

Baring any of the above working I would seriously reconsider the design
of this particular set of logic. But I am sure something like the above
will work for you.

Al



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

Reply via email to