[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit SubmitButton.java,1.13,1.14 WebForm.java,
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2003-02-17 03:17:09
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit
In directory sc8-pr-cvs1:/tmp/cvs-serv17624/src/com/meterware/httpunit
Modified Files:
SubmitButton.java WebForm.java
Log Message:
#682518: now run onClick script when WebForm.submit(button) is called
Index: SubmitButton.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/SubmitButton.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- SubmitButton.java 13 Oct 2002 23:53:48 -0000 1.13
+++ SubmitButton.java 17 Feb 2003 03:17:05 -0000 1.14
@@ -45,7 +45,7 @@
* submits the form.
*/
public void click() throws IOException, SAXException {
- if (doOnClickEvent()) getForm().submit( this );
+ getForm().submit( this );
}
Index: WebForm.java
===================================================================
RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/WebForm.java,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- WebForm.java 6 Feb 2003 02:55:58 -0000 1.76
+++ WebForm.java 17 Feb 2003 03:17:05 -0000 1.77
@@ -60,8 +60,10 @@
* inhibits the submission, will return the updated contents of the frame containing this form.
**/
public WebResponse submit( SubmitButton button ) throws IOException, SAXException {
- String event = getAttribute( "onsubmit" );
- if (event.length() == 0 || getScriptableObject().doEvent( event )) return submitRequest( getRequest( button ) );
+ if (button.doOnClickEvent()) {
+ String event = getAttribute( "onsubmit" );
+ if (event.length() == 0 || getScriptableObject().doEvent( event )) return submitRequest( getRequest( button ) );
+ }
return getBaseResponse().getWindow().getFrameContents( getTarget() );
}
|