Thanks for the consideration on the issue below. I did figure out my problem
lastnight. Kind of embarrassing... most always are. I wasn't consistent in naming
the session key when I put the form in the session in my FetchAssetAction. When I
moved control to the next action (EditAssetAction) Struts could not find the form so
it instantiated another. This is fixed by either naming the session key the name
defined in the <form-bean> tag or use the attribute parameter in the action-mapping
tag.
Thanks again.
Greg
Hopefully I'm not beating the group down with this question. I've seen several posts
that discuss "Wizard" functionality which makes use of the same form-bean across
multiple pages. I think I understand how that works and can make it work in my
application provided I'm starting w/o existing data.
If I bring existing data into my "Wizard" I get page 1 data, but not subsequent pages.
The run down:
I call "fetch.do" ( FetchAssetAction)
- go to the database and retrieve asset info and place in AssetForm
- put AssetForm in the Session
- forward to first page of "Wizard"
* data for first page is there
All pages of the "Wizard" post to "edit.do" (EditAssetAction)
- EditAssetAction determines next ActionForward
<action path="/edit"
type="org.eyecontact.asset.action.EditAssetAction"
name="AssetForm"
scope="session">
</action>
<action path="/fetch"
type="org.eyecontact.asset.action.FetchAssetAction"
name="AssetForm"
scope="session">
</action>
When I post from the first "Wizard" page the AssetForm gets reinitialized with the
data contained on the first "Wizard" page. I lose the data stored in the form for
subsequent "Wizard" pages.
I think I'm missing a fundamental design element that I hope someone can help me with.
Thanks in advance.
Greg