Re: Form reset()

2006-06-07 Thread vijay r
Suppose we have a page P1.jsp which has a corrosponding form bean, say, TestForm. If the scope of the bean is request, then whenever we access P1.jsp, the reset() method will be called. If the scope is session, reset() method will be called only for the first time, when the bean is actually loade

Re: Form reset()

2006-05-29 Thread Philihp Busby
ActionForm objects are reused. A new one may not necessarily be created every time a form is submitted... Struts will try and reuse one from a pool of ActionForm objects. If there's a free one, it calls reset() before populating it in the controller with form values and hands it to your action.

Action Form reset()

2006-05-29 Thread Miguel Galves
Hi, when I'm in an ExceptionHandler or inside an action method, and I forward the control to a specific DispatchAction method, as in the code below, does struts reset the form ? It seems to me that it doesn't, but we having some strange behaviours in some forms, and I would like to be sure of how

Form reset()

2006-05-29 Thread Miguel Galves
Hi, can someone tell exactly in which cases the ActionForm.reset() method is called ? More specifically, when an action or a erro handler redirects the system to a specific DispatchAction method, as showed in the code below, dos struts reset the form ? public class MyExceptionHandler extends Exc

Re: Strange Form Reset Behavior

2006-03-23 Thread Marcio Ghiraldelli
Cool name="Form" scope="request" - Original Message - From: "Marcio Ghiraldelli" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 23, 2006 11:05 AM Sub

Re: Strange Form Reset Behavior

2006-03-23 Thread Marcio Ghiraldelli
without using request? The form instance is only created in the view! - puzzled! - - Original Message - From: "Dave Newton" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" Sent: Thursday, March 23, 2006 10:13

Re: Strange Form Reset Behavior

2006-03-23 Thread Dave Newton
Marcio Ghiraldelli wrote: > How? Supose I have a form with an select combo. The itens should be > populated with a database result. The only way I could acomplish this > is getting data on the Action before the form view, set the list in > the request, redirect to the view. Then, the view creates a

Re: Strange Form Reset Behavior

2006-03-23 Thread Marcio Ghiraldelli
If you want to just return to the same page after you submit, then simply provide that as the return value in your Action and have it mapped just like you would for going to any other page in your flow. There is no difference what so ever. Maybe I'm confused what you are trying to accomplish?

Re: Strange Form Reset Behavior

2006-03-22 Thread Michael Jouravlev
You should clean the form only on input phase. Thus, you need to somehow distinguish input phase from render phase since reset() does not make this distinction. If you always submit a form using POST, you can assume that POST means input phase. Or, you can check for a certain parameter in the reque

Re: Strange Form Reset Behavior

2006-03-22 Thread Rick Reumann
Marcio Ghiraldelli wrote the following on 3/22/2006 8:46 AM: Hello, I am facing a strange ActionForm Reset behavior with Struts 1.2: I want after submit a form, redirect via controler to the same form (so the user can submit it subsequently times). If you want to just return to the same

Strange Form Reset Behavior

2006-03-22 Thread Marcio Ghiraldelli
Hello, I am facing a strange ActionForm Reset behavior with Struts 1.2: I want after submit a form, redirect via controler to the same form (so the user can submit it subsequently times). Should the normal behavior be: 1) Controler receives the first request (Action.do)

Re: grab form bean was Re: form reset

2004-10-07 Thread wiwit_tjahjana
7/2004 11:05 AM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To [EMAIL PROTECTED] cc Subject grab form bean was Re: form reset Hey guys, Thanks for the response on my first question. Turns out I'm an idiot and was pre-filling a form element vi

grab form bean was Re: form reset

2004-10-07 Thread roy-strutsuser
Hey guys, Thanks for the response on my first question. Turns out I'm an idiot and was pre-filling a form element via the value parameter of a tag. However this now leads to a second question. How do I grab the form bean and the fields? I'd like to print the value of a form field either on

grab form bean was Re: form reset

2004-10-07 Thread roy-strutsuser
Hey guys, Thanks for the response on my first question. Turns out I'm an idiot and was pre-filling a form element via the value parameter of a tag. However this now leads to a second question. How do I grab the form bean and the fields? I'd like to print the value of a form field either on

RE: form reset

2004-10-06 Thread Chris Bredesen
What is it doing or not doing that is giving you trouble? > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Wednesday, October 06, 2004 4:47 PM > To: [EMAIL PROTECTED] > Subject: form reset > > > Hi guys, > > I know thi

Re: form reset

2004-10-06 Thread Wendy Smoak
From: <[EMAIL PROTECTED]> > I know this has been asked before... but nothing seems to be working for me. > I have a ActionForm in which I reset all my fields to null. > Can someone please not only correct me on what I'm doing wrong but also explain why? > form.reset( mapping, request ); This one

form reset

2004-10-06 Thread roy-strutsuser
Hi guys, I know this has been asked before... but nothing seems to be working for me. I have a ActionForm in which I reset all my fields to null. Can someone please not only correct me on what I'm doing wrong but also explain why? I've tried both these of these: -- if ( map

form reset

2004-10-06 Thread roy-strutsuser
Hi guys, I know this has been asked before... but nothing seems to be working for me. I have a ActionForm in which I reset all my fields to null. Can someone please not only correct me on what I'm doing wrong but also explain why? I've tried both these of these: -- if ( map

[OT] RE: session form "reset"

2004-04-22 Thread Geeta Ramani
yippee, time for lunch then: you've earned it..:) > -Original Message- > From: Matt Bathje [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 22, 2004 12:22 PM > To: Struts Users Mailing List > Subject: Re: session form "reset" > > > Well I changed

Re: session form "reset"

2004-04-22 Thread Matt Bathje
att Bathje - Original Message - From: "Geeta Ramani" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 11:09 AM Subject: RE: session form "reset" > Ok, then I guess I'm stumped too.. Sorry! >

RE: session form "reset"

2004-04-22 Thread Geeta Ramani
it without doing the removeattribute, and it > still leaves the > wrong data. (No crashes though...) > > Matt Bathje > > > - Original Message - > From: "Geeta Ramani" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List"

Re: session form "reset"

2004-04-22 Thread Matt Bathje
t Bathje - Original Message - From: "Geeta Ramani" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, April 22, 2004 10:43 AM Subject: RE: session form "reset" > How about just this: (iow, don't add

RE: session form "reset"

2004-04-22 Thread Geeta Ramani
How about just this: (iow, don't add the "session.removeAttribute("myform"); bit. That's the part that gives you the error, right?) > > myForm.set("mybean", mybean); > request.setAttribute("mybean", mybean); > session.setAttribute("myform", myForm); Won't that work for you? Geeta -

Re: session form "reset"

2004-04-22 Thread Matt Bathje
> > > > Here is the chain of events, maybe that will help > > > > Form Preloader -> Form Page -> Submit Action -> Form > > Preloader -> Form Page > > > > In Submit Action, I have tried doing > > session.removeAttribute("myForm"); and > > it doesn't work (gives the beanutils.populate error). I have

RE: session form "reset"

2004-04-22 Thread Geeta Ramani
Matt: > -Original Message- > From: Matt Bathje [mailto:[EMAIL PROTECTED] > Sent: Thursday, April 22, 2004 11:27 AM > To: Struts Users Mailing List > Subject: Re: session form "reset" > > > Here is the chain of events, maybe that will help > &g

Re: session form "reset"

2004-04-22 Thread Matt Bathje
L PROTECTED] > Sent: Thursday, April 22, 2004 10:59 AM > To: strutslist > Subject: session form "reset" > > > Hey all - I'm having a small problem and was wondering if anybody could > help. > > I have a page with a form, that when I submit, comes right back

RE: session form "reset"

2004-04-22 Thread Geeta Ramani
saying that if in the action preceeding the forward you reset the form (and set the session var again maybe?), this does not work? Regards, Geeta -Original Message- From: Matt Bathje [mailto:[EMAIL PROTECTED] Sent: Thursday, April 22, 2004 10:59 AM To: strutslist Subject: session form

Re: session form "reset"

2004-04-22 Thread Jignesh Patel
Go through with SessionBindingListener and SessionAttributeListener. And implement the appropriate one. -Jignesh On Thursday 22 April 2004 20:29, Matt Bathje wrote: > Hey all - I'm having a small problem and was wondering if anybody could > help. > > I have a page with a form, that when I submit,

session form "reset"

2004-04-22 Thread Matt Bathje
Hey all - I'm having a small problem and was wondering if anybody could help. I have a page with a form, that when I submit, comes right back to the same page with the updated information. The form is held in the session scope because it has some dynamic indexed data in it. My problem is that par