Re: Losing request attributes after validate()

2005-05-08 Thread Michael Jouravlev
It seems that what you want to do is typical. I suggest you to take a different approach, a model-based approach. Consider this: you want to create or modify an _object_, not just some form fields. So, your form should pull the data from an object and show it. It should not matter for the form, is

Re: Losing request attributes after validate()

2005-05-08 Thread David Johnson
Right. What I want is to pre-populate text fields if the user id "editing" or set it to "" if the user is creating a new thing. I think what I'll settle on is making the "portfolioName" request attribute a session attribute instead, then in the Save() methos, execute a myForm.reset() Is that f

Re: Losing request attributes after validate()

2005-05-06 Thread Michael Jouravlev
Umm... This one pulls data from userName property of a form bean. So if the form bean has session scope, the value will be retained.. This one pulls value from portfolioName, you need to check where this object is stored, in what scope. You are right, if this object has request or page scope, th

RE: Losing request attributes after validate()

2005-05-06 Thread Barnett, Brian W.
To the action mapping -Original Message- From: David Johnson [mailto:[EMAIL PROTECTED] Sent: Friday, May 06, 2005 1:52 PM To: Michael Jouravlev; Struts Users Mailing List Subject: Re: Losing request attributes after validate() a I see. Soam I adding scrope="session" t

Re: Losing request attributes after validate()

2005-05-06 Thread David Johnson
also.. you're RIGHT!!! It's not working in other places either!!! here's a question. The way I thought it would work is that under the covers and before redirecting BACK to the page (assuming validate() fails) I thought it would take all the form attributes and put them back on the request to p

Re: Losing request attributes after validate()

2005-05-06 Thread David Johnson
a I see. Soam I adding scrope="session" to the Form Bean or the Action Mapping? On 5/6/05, Michael Jouravlev <[EMAIL PROTECTED]> wrote: > > > I do have redirect="true" set on the actionMapping that brings me to > this > > page, and tthe browser should be caching field values. > > > > the

Re: Losing request attributes after validate()

2005-05-06 Thread Michael Jouravlev
> I do have redirect="true" set on the actionMapping that brings me to this > page, and tthe browser should be caching field values. > > the weird thing is this works in other places If you want to keep redirect="true" (I personally prefer redirects for better user experience), then you may wa

Re: Losing request attributes after validate()

2005-05-06 Thread David Johnson
I actually am for one of the properties. In the page I have : and in the Action Class (right before the reditrct to this page) request.setAttribute("queryName",queryName); and it shows fine in view--> source. thn if I submit the form (wiuth an error) the hidden field is **not** populated On

Re: Losing request attributes after validate()

2005-05-06 Thread Michael Jouravlev
Do you redirect to your form, and your form bean has request scope? Or do you just click Back browser button, and your pages are marked as non-cachable or browser is instructed not to cache field values? On 5/6/05, David Johnson <[EMAIL PROTECTED]> wrote: > Hi all > I apprear to be losing my requ