ASF Bugzilla – Attachment 9555 Details for
Bug 25497
Input tags generate invalid XHTML,
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Checkbox input taglib patch
CheckBox.patch.txt (text/plain), 8.93 KB, created by
Ben Meadowcroft
on 2003-12-13 10:22:51 UTC
(
hide
)
Description:
Checkbox input taglib patch
Filename:
MIME Type:
Creator:
Ben Meadowcroft
Created:
2003-12-13 10:22:51 UTC
Size:
8.93 KB
patch
obsolete
>--- CheckBox.orig 2003-12-12 09:39:28.000000000 +0000 >+++ CheckBox.java 2003-12-12 23:09:58.000000000 +0000 >@@ -3,7 +3,7 @@ > * > * The Apache Software License, Version 1.1 > * >- * Copyright (c) 1999 The Apache Software Foundation. All rights >+ * Copyright (c) 1999 The Apache Software Foundation. All rights > * reserved. > * > * Redistribution and use in source and binary forms, with or without >@@ -11,7 +11,7 @@ > * are met: > * > * 1. Redistributions of source code must retain the above copyright >- * notice, this list of conditions and the following disclaimer. >+ * notice, this list of conditions and the following disclaimer. > * > * 2. Redistributions in binary form must reproduce the above copyright > * notice, this list of conditions and the following disclaimer in >@@ -19,15 +19,15 @@ > * distribution. > * > * 3. The end-user documentation included with the redistribution, if >- * any, must include the following acknowlegement: >- * "This product includes software developed by the >+ * any, must include the following acknowlegement: >+ * "This product includes software developed by the > * Apache Software Foundation (http://www.apache.org/)." > * Alternately, this acknowlegement may appear in the software itself, > * if and wherever such third-party acknowlegements normally appear. > * > * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software > * Foundation" must not be used to endorse or promote products derived >- * from this software without prior written permission. For written >+ * from this software without prior written permission. For written > * permission, please contact apache@apache.org. > * > * 5. Products derived from this software may not be called "Apache" >@@ -53,7 +53,7 @@ > * information on the Apache Software Foundation, please see > * <http://www.apache.org/>. > * >- */ >+ */ > package org.apache.taglibs.input; > > import java.util.*; >@@ -63,7 +63,7 @@ > > /** > * >- * This class implements the <input:checkbox> tag, which presents an >+ * This class implements the <input:checkbox> tag, which presents an > * <input type="checkbox" ... /> form element. > * > * @version 0.90 >@@ -133,7 +133,7 @@ > * selections. (No need for a hash table as in <select> because > * we're doing this exactly once per tag. We COULD cache stuff > * between tags, but I'm not sure that kind of extra performance >- * would ever be called for.) >+ * would ever be called for.) > * We first check if there is a bean value associated with the checkbox, if > * there is we use it. > * Then note that we only use the >@@ -146,7 +146,7 @@ > * as the initial value of the property in the bean when it is constructed > * rather than using the "default" attribute of the checkbox tag. > */ >- >+ > // First check beanValue, if available - then we don't worry about > // the defaults or request values etc > String [] beanValues = ( beanId != null ? Util.beanPropertyValues( >@@ -154,7 +154,7 @@ > if ( beanValues != null ) { > for ( int i = 0; i < beanValues.length; i++ ) { > if ( beanValues[i] != null && beanValues[i].equals( value ) ) { >- out.print("checked=\"true\" "); >+ out.print("checked=\"checked\" "); > break; > } > } >@@ -170,7 +170,7 @@ > "'default' array must only contain non-null " > + "Strings"); > if ((dVals.get(i)).equals(value)) { >- out.print("checked=\"true\" "); >+ out.print("checked=\"checked\" "); > break; // why go on? > } > } >@@ -183,13 +183,13 @@ > // use the request if it says anything > for (int i = 0; i < checked.length; i++) { > if (checked[i].equals(value)) { >- out.print("checked=\"true\" "); >+ out.print("checked=\"checked\" "); > break; // why go on? > } > } > } > } >- >+ > // end the tag > out.print("/>"); > >@@ -198,25 +198,25 @@ > } > return SKIP_BODY; > } >- >+ > /** Getter for property name. > * @return Value of property name. > */ > public String getName() { return name; } >- >+ > public void setName(String x) { > name = x; > } >- >+ > /** Getter for property value. > * @return Value of property value. > */ > public String getValue() { return value; } >- >+ > public void setValue(String x) { > value = x; > } >- >+ > /** Getter for property defaults. > * @return Value of property defaults. > */ >@@ -225,7 +225,7 @@ > public void setDefaults(String[] x) { > dValArray = x; > } >- >+ > /** Getter for property default. > * @return Value of property default. > */ >@@ -234,25 +234,25 @@ > public void setDefault(String x) { > dVal = x; > } >- >+ > /** Getter for property bean. > * @return Value of property bean. > */ > public String getBean() { return beanId; } >- >+ > public void setBean( String x ) { > beanId = x; > } >- >+ > /** Getter for property attributesText. > * @return Value of property attributesText. > */ > public String getAttributesText() { return attributesText; } >- >+ > public void setAttributesText( String x ) { > attributesText = x; > } >- >+ > /** Getter for property attributes. > * @return Value of property attributes. > */ >@@ -261,5 +261,5 @@ > public void setAttributes(Map x) { > attributes = x; > } >- >+ > } >--- Checkbox.java 2003-12-13 09:07:01.000000000 +0000 >+++ Checkbox.orig 2003-12-12 09:39:28.000000000 +0000 >@@ -154,7 +154,7 @@ > if ( beanValues != null ) { > for ( int i = 0; i < beanValues.length; i++ ) { > if ( beanValues[i] != null && beanValues[i].equals( value ) ) { >- out.print("checked=\"checked\" "); >+ out.print("checked=\"true\" "); > break; > } > } >@@ -170,7 +170,7 @@ > "'default' array must only contain non-null " > + "Strings"); > if ((dVals.get(i)).equals(value)) { >- out.print("checked=\"checked\" "); >+ out.print("checked=\"true\" "); > break; // why go on? > } > } >@@ -183,7 +183,7 @@ > // use the request if it says anything > for (int i = 0; i < checked.length; i++) { > if (checked[i].equals(value)) { >- out.print("checked=\"checked\" "); >+ out.print("checked=\"true\" "); > break; // why go on? > } > } >--- Checkbox.orig 2003-12-12 09:39:28.000000000 +0000 >+++ Checkbox.java 2003-12-13 09:07:01.000000000 +0000 >@@ -154,7 +154,7 @@ > if ( beanValues != null ) { > for ( int i = 0; i < beanValues.length; i++ ) { > if ( beanValues[i] != null && beanValues[i].equals( value ) ) { >- out.print("checked=\"true\" "); >+ out.print("checked=\"checked\" "); > break; > } > } >@@ -170,7 +170,7 @@ > "'default' array must only contain non-null " > + "Strings"); > if ((dVals.get(i)).equals(value)) { >- out.print("checked=\"true\" "); >+ out.print("checked=\"checked\" "); > break; // why go on? > } > } >@@ -183,7 +183,7 @@ > // use the request if it says anything > for (int i = 0; i < checked.length; i++) { > if (checked[i].equals(value)) { >- out.print("checked=\"true\" "); >+ out.print("checked=\"checked\" "); > break; // why go on? > } > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 25497
: 9555 |
9556
|
9557
|
9558
|
9559