[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit Button.java,1.12,1.13 FormControl.java,1.
Brought to you by:
russgold
|
From: Russell G. <rus...@us...> - 2004-03-09 20:56:23
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26914/src/com/meterware/httpunit Modified Files: Button.java FormControl.java Log Message: enable setting the control 'disabled' attribute from javascript Index: Button.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/Button.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- Button.java 3 Mar 2004 02:20:11 -0000 1.12 +++ Button.java 9 Mar 2004 20:31:03 -0000 1.13 @@ -53,8 +53,6 @@ Button( WebForm form, Node node ) { super( form, node ); _onClickEvent = NodeUtils.getNodeAttribute( node, "onclick" ); - - supportAttribute( "disabled" ); } @@ -121,15 +119,6 @@ public void click() throws IOException, SAXException { doButtonAction(); } - - - public void set( String propertyName, Object value ) { - if (propertyName.equalsIgnoreCase( "disabled" )) { - setDisabled( value instanceof Boolean && ((Boolean) value).booleanValue() ); - } else { - super.set( propertyName, value ); - } - } } Index: FormControl.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/FormControl.java,v retrieving revision 1.45 retrieving revision 1.46 diff -u -r1.45 -r1.46 --- FormControl.java 3 Mar 2004 02:20:11 -0000 1.45 +++ FormControl.java 9 Mar 2004 20:31:03 -0000 1.46 @@ -101,6 +101,7 @@ _onClickEvent = NodeUtils.getNodeAttribute( node, "onclick" ); supportAttribute( "tabindex" ); + supportAttribute( "disabled" ); } @@ -384,6 +385,8 @@ public void set( String propertyName, Object value ) { if (propertyName.equalsIgnoreCase( "value" )) { _valueAttribute = value.toString(); + } else if (propertyName.equalsIgnoreCase( "disabled" )) { + setDisabled( value instanceof Boolean && ((Boolean) value).booleanValue() ); } else { super.set( propertyName, value ); } |