It's a whole new request after the page renders since that completes the
request/response cycle. But the part where an ActionForward sends you
back to the list page should be part of the same request/response.
Unless redirect has been set to true, in which case a response is sent
out to the browser telling it to make a new request. 

If the same ActionForm is being used all-around, it should still be in
the request context when you forward back to the page. If the ActionForm
property that is holding the selected staff type matches the element on
the HTML form, and the html tags are being used, then it should be
selected. 

I'd start by forcing validation to fail to see if it stays selected
then. The roundtrip from validation back to the page should be the same
as the roundtrip from the Action back to the page. 

-- Ted Husted, Husted dot Com, Fairport NY US
-- Developing Java Web Applications with Struts
-- Tel: +1 585 737-3463
-- Web: http://husted.com/about/services


It sounds like that 

Andrew van der Voort wrote:
> 
> I have a list page, that can display different categories of staff. In the
> form that supports the page I have a Collection of staff types, and an
> attribute that holds the selected staff type.
> 
> One of the actions that can be performed from this page is to edit one of
> the displayed staff. In the form that supports this edit action, I also
> have an attribute that holds the selected staff type from the list page.
> This gets automatically populated for me, since the staff type is submitted
> with the page.
> 
> When the user is done editing the staff members details, I return an
> ActionForward that sends me back to the list page. What I want is that role
> type to be automatically populated back into the list form, so that the
> list is displayed with staff of the type that were there when the user went
> to edit one.
> 
> This isn't happening for me. What are the steps I need to do to get this to
> happen? I'd like to avoid creating hidden fields on the html page. I've
> tried request.setAttribute but this doesn't seem to work (which makes sense
> because it's a whole new request when you leave the action, right?).
> 
> Thanks,
> 
> Andrew
> 
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

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

Reply via email to