View | Details | Raw Unified | Return to bug 25497
Collapse All | Expand All

(-)Radio.orig (-17 / +17 lines)
Lines 3-9 Link Here
3
 *
3
 *
4
 * The Apache Software License, Version 1.1
4
 * The Apache Software License, Version 1.1
5
 *
5
 *
6
 * Copyright (c) 1999 The Apache Software Foundation.  All rights 
6
 * Copyright (c) 1999 The Apache Software Foundation.  All rights
7
 * reserved.
7
 * reserved.
8
 *
8
 *
9
 * Redistribution and use in source and binary forms, with or without
9
 * Redistribution and use in source and binary forms, with or without
Lines 11-17 Link Here
11
 * are met:
11
 * are met:
12
 *
12
 *
13
 * 1. Redistributions of source code must retain the above copyright
13
 * 1. Redistributions of source code must retain the above copyright
14
 *    notice, this list of conditions and the following disclaimer. 
14
 *    notice, this list of conditions and the following disclaimer.
15
 *
15
 *
16
 * 2. Redistributions in binary form must reproduce the above copyright
16
 * 2. Redistributions in binary form must reproduce the above copyright
17
 *    notice, this list of conditions and the following disclaimer in
17
 *    notice, this list of conditions and the following disclaimer in
Lines 19-33 Link Here
19
 *    distribution.
19
 *    distribution.
20
 *
20
 *
21
 * 3. The end-user documentation included with the redistribution, if
21
 * 3. The end-user documentation included with the redistribution, if
22
 *    any, must include the following acknowlegement:  
22
 *    any, must include the following acknowlegement:
23
 *       "This product includes software developed by the 
23
 *       "This product includes software developed by the
24
 *        Apache Software Foundation (http://www.apache.org/)."
24
 *        Apache Software Foundation (http://www.apache.org/)."
25
 *    Alternately, this acknowlegement may appear in the software itself,
25
 *    Alternately, this acknowlegement may appear in the software itself,
26
 *    if and wherever such third-party acknowlegements normally appear.
26
 *    if and wherever such third-party acknowlegements normally appear.
27
 *
27
 *
28
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
28
 * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
29
 *    Foundation" must not be used to endorse or promote products derived
29
 *    Foundation" must not be used to endorse or promote products derived
30
 *    from this software without prior written permission. For written 
30
 *    from this software without prior written permission. For written
31
 *    permission, please contact apache@apache.org.
31
 *    permission, please contact apache@apache.org.
32
 *
32
 *
33
 * 5. Products derived from this software may not be called "Apache"
33
 * 5. Products derived from this software may not be called "Apache"
Lines 53-59 Link Here
53
 * information on the Apache Software Foundation, please see
53
 * information on the Apache Software Foundation, please see
54
 * <http://www.apache.org/>.
54
 * <http://www.apache.org/>.
55
 *
55
 *
56
 */ 
56
 */
57
package org.apache.taglibs.input;
57
package org.apache.taglibs.input;
58
58
59
import java.util.*;
59
import java.util.*;
Lines 63-69 Link Here
63
63
64
/**
64
/**
65
 *
65
 *
66
 *  This class implements the &lt;input:radio&gt; tag, which presents an 
66
 *  This class implements the &lt;input:radio&gt; tag, which presents an
67
 *  &lt;input type="radio" ... /&gt; form element.
67
 *  &lt;input type="radio" ... /&gt; form element.
68
 *
68
 *
69
 *  @version 0.90
69
 *  @version 0.90
Lines 117-123 Link Here
117
117
118
            // check this button if it's the right one
118
            // check this button if it's the right one
119
            String target;
119
            String target;
120
            
120
121
            // First check the bean value
121
            // First check the bean value
122
            String beanValue = ( beanId != null ? Util.beanPropertyValue(
122
            String beanValue = ( beanId != null ? Util.beanPropertyValue(
123
                pageContext.findAttribute( beanId ), name ) : null );
123
                pageContext.findAttribute( beanId ), name ) : null );
Lines 131-139 Link Here
131
            else {
131
            else {
132
                target = req.getParameter(name);
132
                target = req.getParameter(name);
133
            }
133
            }
134
            
134
135
            if (target != null && target.equals(value))
135
            if (target != null && target.equals(value))
136
                out.print("checked=\"true\" ");
136
                out.print("checked=\"checked\" ");
137
137
138
            // end the tag
138
            // end the tag
139
            out.print("/>");
139
            out.print("/>");
Lines 155-165 Link Here
155
    public void setAttributes(Map x) {
155
    public void setAttributes(Map x) {
156
        attributes = x;
156
        attributes = x;
157
    }
157
    }
158
    
158
159
    public void setAttributesText( String x ) {
159
    public void setAttributesText( String x ) {
160
        attributesText = x;
160
        attributesText = x;
161
    }
161
    }
162
    
162
163
    public void setBean( String x ) {
163
    public void setBean( String x ) {
164
        beanId = x;
164
        beanId = x;
165
    }
165
    }
Lines 167-193 Link Here
167
    public void setDefault(String x) {
167
    public void setDefault(String x) {
168
        dVal = x;
168
        dVal = x;
169
    }
169
    }
170
    
170
171
    /** Getter for property name.
171
    /** Getter for property name.
172
     * @return Value of property name.
172
     * @return Value of property name.
173
     */
173
     */
174
    public String getName() { return name; }
174
    public String getName() { return name; }
175
    
175
176
    /** Getter for property default.
176
    /** Getter for property default.
177
     * @return Value of property default.
177
     * @return Value of property default.
178
     */
178
     */
179
    public String getDefault() { return dVal; }
179
    public String getDefault() { return dVal; }
180
    
180
181
    /** Getter for property bean.
181
    /** Getter for property bean.
182
     * @return Value of property bean.
182
     * @return Value of property bean.
183
     */
183
     */
184
    public String getBean() { return beanId; }
184
    public String getBean() { return beanId; }
185
    
185
186
    /** Getter for property attributesText.
186
    /** Getter for property attributesText.
187
     * @return Value of property attributesText.
187
     * @return Value of property attributesText.
188
     */
188
     */
189
    public String getAttributesText() { return attributesText; }
189
    public String getAttributesText() { return attributesText; }
190
    
190
191
    /** Getter for property attributes.
191
    /** Getter for property attributes.
192
     * @return Value of property attributes.
192
     * @return Value of property attributes.
193
     */
193
     */
(-)Radio.orig (-1 / +1 lines)
Lines 133-139 Link Here
133
            }
133
            }
134
            
134
            
135
            if (target != null && target.equals(value))
135
            if (target != null && target.equals(value))
136
                out.print("checked=\"true\" ");
136
                out.print("checked=\"checked\" ");
137
137
138
            // end the tag
138
            // end the tag
139
            out.print("/>");
139
            out.print("/>");

Return to bug 25497