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
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
Could you be little bit clear at your JSP?
Thanks.
Jitender Kumar C.V.
I dont think this is right solution..
Jitender Kumar C.V.
Why didnt I use html:hidden?
Whenever I use that I have parsing error and exception thrown which I
think is because of the bean:write within html:hidden. Using input
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
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 will
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.
Perhaps you would like to use the html-el tags (which also come with the
Struts dist), like this:
html-el:hidden property=${myBean.myField}/
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
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
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
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 at
Hi,
Test like this!
In JSP
input type=hidden property=userID /
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
12 matches
Mail list logo