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
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
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
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
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
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
> 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
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
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
Denis, that's not the point of our discussion. One
more time: I'm not talking about formBean attributes.
Anyway, Hubert pointed a workaroung for my problem.
Thanks.
--- Denis Avdic <[EMAIL PROTECTED]> escreveu:
> In order to keep the actual entries that the user
> typed in (so they
> don't ha
In order to keep the actual entries that the user typed in (so they
don't have to retype everything if they changed a bunch of things) I
usually put the entire form and errors into request if there are
errors.
Then you need to make sure that your populate action checks for
presence of the form in
Hubert,
i think that's actually the only solution.
Thanks.
> You can point the "input" to an action which will
> populate the request with
> the attribute(s) you need, and then forwards to your
> form.
>
> --- Hubert Rabago <[EMAIL PROTECTED]> wrote:
>
> > This is because when the user submit
You can point the "input" to an action which will populate the request with
the attribute(s) you need, and then forwards to your form.
--- Hubert Rabago <[EMAIL PROTECTED]> wrote:
> This is because when the user submits the form, that already starts a
> different request, so the request attribute
13 matches
Mail list logo