Hi,
Test like this!
In JSP
write get and set method for userID in ActionForm
On 20 Sep 2004 17:44:15 +0800, Sebastian Ho
<[EMAIL PROTECTED]> wrote:
> Ok I resolved it and I think this is the best way at least for now.
> In my ActionForm, set the attribute back in request if there's er
Ok I resolved it and I think this is the best way at least for now.
In my ActionForm, set the attribute back in request if there's error :
if(errors != null) {
ActionForm form = new ActionForm();
form.set
form.set
request.setAttribute("user", form);
}
Sebastian
On Mon, 2004-09-20 a
What did you change to Session scope?
It looks to me like you are trying to put the current user ID into the
form as a hidden variable. I would have thought that your "user" bean
would already have been in Session scope . . . not the case? Are you
retrieving other values for your form from Sessi
Tried changing it to session scpope. Guess wat, I hit into another
problem. Because the values are in session scope, whenever there's
validation errors, the values entered by user previously was reset to
whats set in session!
Guess have to continue reading to find a workaround.. If only struts
doe
Perhaps you would like to use the html-el tags (which also come with the
Struts dist), like this:
But there is nothing wrong with using the standard html hidden input as
far as I know (but you give up some Struts luxuries).
Using Session scope is one way, but not the only way, to solve your
p
Hi Sebastian,
I would suggest you to manually call validate method and let your data
still remains in the request scope incase of validation being failed. I
feel this to be a better solution for your scenario.
Jitender Kumar C.V.
I thought you can't control redirect/forwrd for validation? I can
control that for mapping forward only.
Sebastian
On Mon, 2004-09-20 at 15:14, Sachin Bhutada wrote:
> hi sebastian,
> If you have configured action to use redirect ( which is
> normal case ), ur request attributes wi
Why didnt I use html:hidden?
Whenever I use that I have parsing error and exception thrown which I
think is because of the within . Using
didn't cause any problem.
If html:hidden will not cause the problem and I am doing it the wrong
way. Pls advise.
Ok..now I understand the scope implication.
I dont think this is right solution..
Jitender Kumar C.V.
Could you be little bit clear at your JSP?
Thanks.
Jitender Kumar C.V.
First I would ask, why aren't you using the Struts tags (such as
html:hidden)? I assume that you are using them to render your other
inputs (such as those of type "text").
But, to answer your question, it's a matter of scope. When the page
containing the form is first rendered, the hidden varia
hi sebastian,
If you have configured action to use redirect ( which is
normal case ), ur request attributes will be lost.
Try putting that bean seesion scope.
sachin
xoriant, mumbai
PS : also make sure, how does struts take us back to input page ?( using
forward or redirect i gue
12 matches
Mail list logo