Hey,

 This explanation is awesome.
"...then if the user hits the back button, if (and only IF) the form did NOT
have radios selected, the radios should clear." 
The above scenario in my case is :
"...then if the user hits the back button, the form did HAVE
 radios selected, the radios should clear." How to do that ?

Thanks
Priyank

-----Original Message-----
From: James Mitchell [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 01, 2002 11:20 AM
To: Struts Users Mailing List
Subject: RE: Reset button does not invoke the FormBean's reset()


I'm trying to help you, but I'm not understanding what problems you are
having.

Please describe your use case further.

Example:
Use Case: Complete Personal Information

#1. The user fills out form.
    Form:
     Textbox ("firstname"):
      - Max=10 chars
      - Required=lowercase
     Textbox ("lastname"):
      - Max=10 chars
      - Required=lowercase
     Radio Button Choice ("age-range")
       - values coming from application scope bean ("mychoices")
       - Choices are (Iteration 1):
          Key       Value
          1         0  to 21
          2         22 to 40
          3         41 to 60
          4         over 60

    Action choices:
     Submit - form is submitted, go to #2
     Cancel - form is cancelled, go to main menu
     Reset  - form is reset (this is an html reset)
     Clear  - form is cleared of all values

#2  When submitted, should save to database
    Known Exceptions:
     a. Validation errors - (reference validation table)
     b. Connection errors - (same as above)
     c. blah, blah, blah

#3  Re-Display information (as it was saved)
    Action choices:
     a. user must use top level navigation to continue
     b. User hits back button - (this behavior is
        disallowed, and enforced with form-based
        token validation)


--------------------------------------------
Now, expecting functionality from anything after the user hits the back
button should not be allowed, but as I mentioned in a prior email....if you
do this...

myform.jsp  -> /doForm.do  -> myresults.jsp

...then if the user hits the back button, if (and only IF) the form did NOT
have radios selected, the radios should clear.

**THIS IS IMPORTANT**
Given the same scenario as above, if there are validation errors and the
user is return to the 'myform.jsp' hitting the reset button ***WILL NOT***
reset the fields to what they were before the user hit submit.
Now, if the user hits the back button right now, and the hit the reset
button, then yes, it will do as I said above.


I hope this helps you, if not, then please provide us with more to go on.



James Mitchell
Software Engineer\Struts Evangelist
Struts-Atlanta, the "Open Minded Developer Network"
http://www.open-tools.org/struts-atlanta




> -----Original Message-----
> From: Gupta, Priyank x57787 [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 01, 2002 10:52 AM
> To: 'Struts Users Mailing List'
> Subject: RE: Reset button does not invoke the FormBean's reset()
>
>
> Hey
>  I am using the reset button and it's not working .
> Try to be serious on the mailing lists , it's not
> your personal , alright.If you have some real solution
> please let me know.
> Thanks
> Priyank
>
> -----Original Message-----
> From: James Mitchell [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, August 01, 2002 10:46 AM
> To: Struts Users Mailing List
> Subject: RE: Reset button does not invoke the FormBean's reset()
>
>
> Yes, use the reset button...
>
> <html:reset value="Reset">
>
> James Mitchell
> Software Engineer\Struts Evangelist
> Struts-Atlanta, the "Open Minded Developer Network"
> http://www.open-tools.org/struts-atlanta
>
>
> > -----Original Message-----
> > From: Gupta, Priyank x57787 [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, August 01, 2002 8:45 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: Reset button does not invoke the FormBean's reset()
> >
> >
> > Hi JML,
> >  Thanks for your response. I think using <html:submit  value="reset"
> > property="reset"/>
> > will post the form and take me to the next page or the same if
> I have that
> > mapping
> > in struts-config.xml. But, is there a way to reset the radio buttons to
> > unselected
> > values without server round trip using some javascript .
> > Thanks
> > Priyank
> >
>
> <snip/>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

Reply via email to