WAButtonTest

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

WAButtonTest

Freeman Mayberry
I was going through the Functional Seaside Test Suite (package name: Seaside-Tests-Functional) and I came across the Button test.  At first everything seemed fine but apparently the reset button is not supposed to do anything.  Or maybe it is, and mine is just not working for some reason.
 
I was wondering if there was a simple way to make the reset button do what it is supposed to do.  I looked up the beReset method and it just sets the type to reset, but then I got lost in the code.
 
renderResetOn: html
 html heading level2 with: 'Reset'.
 html paragraph: 'Clicking the button should not submit the form reset the value in "Input"'. (confusedly worded)
 html button beReset; with: 'Reset'
 
Please note that I am an extreme newbie to Seaside and I guess I am new to programming in general.

--
Freeman

_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
Reply | Threaded
Open this post in threaded view
|

Re: WAButtonTest

Philippe Marschall
2008/7/17 Freeman Mayberry <[hidden email]>:
> I was going through the Functional Seaside Test Suite (package
> name: Seaside-Tests-Functional) and I came across the Button test.  At first
> everything seemed fine but apparently the reset button is not supposed to do
> anything.  Or maybe it is, and mine is just not working for some reason.

Of course it does something and it works. What it should do is what is
does is what is outlined in the method comment

"When activated it resets all controls to their initial values."

To observe this behavior change the value in the input field named
"Input" and then press "Reset". Note that Seaside only creates reset
buttons. The actual behavior is implemented by the browser and
specified in section 17.2.1 of the HTML 4.01 spec.

http://www.w3.org/TR/REC-html40/interact/forms.html#reset-button

Note that the exact wording of the spec is in the method comment.

> I was wondering if there was a simple way to make the reset button do what
> it is supposed to do.  I looked up the beReset method and it just sets the
> type to reset, but then I got lost in the code.
>
> renderResetOn: html
>  html heading level2 with: 'Reset'.
>  html paragraph: 'Clicking the button should not submit the form reset the
> value in "Input"'. (confusedly worded)
>  html button beReset; with: 'Reset'
>
> Please note that I am an extreme newbie to Seaside and I guess I am new to
> programming in general.

Reset buttons are a rarely used feature and there are some people who
are arguing against using them. They are there merely for
completeness.

Cheers
Philippe
_______________________________________________
seaside mailing list
[hidden email]
http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside