Re: double submit of forms
Florian Weimer <[email protected]> Wed, 12 Aug 2009 07:12:39 +0000
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Message-ID | <[email protected]> |
* Dan Lipofsky:
> I am trying to use HttpUnit 1.7 and I am encountering
> an odd behavior where it submits the same form twice
> when using form.submit(SubmitButton).
This is fixed in Subversion, I think. The patch is (revision numbers
are from a local repository):
Index: src/com/meterware/httpunit/WebForm.java
===================================================================
--- src/com/meterware/httpunit/WebForm.java (revision 3361)
+++ src/com/meterware/httpunit/WebForm.java (revision 3362)
@@ -104,7 +104,7 @@
**/
public WebResponse submit( SubmitButton button, int x, int y ) throws IOException, SAXException {
WebResponse result=null;
- if (button==null || button.doOnClickSequence(x, y)) {
+ if (button==null || !button.doOnClickSequence(x, y)) {
result= doFormSubmit( button, x, y );
} else {
result=getCurrentFrameContents();
--
Florian Weimer <[email protected]>
BFK edv-consulting GmbH http://www.bfk.de/
Kriegsstraße 100 tel: +49-721-96201-1
D-76133 Karlsruhe fax: +49-721-96201-99
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july