[Httpunit-commit] CVS: httpunit/src/com/meterware/httpunit FormControl.java,1.24,1.25
Brought to you by:
russgold
From: Russell G. <rus...@us...> - 2002-09-27 16:30:15
|
Update of /cvsroot/httpunit/httpunit/src/com/meterware/httpunit In directory usw-pr-cvs1:/tmp/cvs-serv6011/src/com/meterware/httpunit Modified Files: FormControl.java Log Message: Added support for the disabled attribute for form parameters Index: FormControl.java =================================================================== RCS file: /cvsroot/httpunit/httpunit/src/com/meterware/httpunit/FormControl.java,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- FormControl.java 9 Sep 2002 20:04:25 -0000 1.24 +++ FormControl.java 27 Sep 2002 16:30:13 -0000 1.25 @@ -135,7 +135,7 @@ * Returns true if this control is read-only. **/ boolean isReadOnly() { - return _readOnly; + return _readOnly || _disabled; } @@ -406,7 +406,7 @@ void addValues( ParameterProcessor processor, String characterSet ) throws IOException { - if (isChecked()) processor.addParameter( getName(), getQueryValue(), characterSet ); + if (isChecked() && !isDisabled()) processor.addParameter( getName(), getQueryValue(), characterSet ); } @@ -638,7 +638,7 @@ void addValues( ParameterProcessor processor, String characterSet ) throws IOException { - if (getName().length() > 0) processor.addParameter( getName(), getValues()[0], characterSet ); + if (!isDisabled() && getName().length() > 0) processor.addParameter( getName(), getValues()[0], characterSet ); } @@ -862,6 +862,7 @@ void addValues( ParameterProcessor processor, String characterSet ) throws IOException { + if (isDisabled()) return; for (int i = 0; i < getValues().length; i++) { processor.addParameter( getName(), getValues()[i], characterSet ); } |