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

(-)Form.orig (-22 / +22 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:form&gt; tag, which presents an 
66
 *  This class implements the &lt;input:form&gt; tag, which presents an
67
 *  &lt;form ... /&gt; element.
67
 *  &lt;form ... /&gt; element.
68
 *
68
 *
69
 *  @version 0.90
69
 *  @version 0.90
Lines 81-87 Link Here
81
    private String beanId;      // bean id to get default values from
81
    private String beanId;      // bean id to get default values from
82
    private String method;      // form method
82
    private String method;      // form method
83
    private String encType;     // form encType
83
    private String encType;     // form encType
84
    
84
85
    public int doStartTag() throws JspException {
85
    public int doStartTag() throws JspException {
86
        try {
86
        try {
87
            // get what we need from the page
87
            // get what we need from the page
Lines 89-95 Link Here
89
89
90
            // start building up the tag
90
            // start building up the tag
91
            out.print("<form method=\"" );
91
            out.print("<form method=\"" );
92
            out.print( method != null ? method : "GET" );
92
            out.print( method != null ? method : "get" );
93
            out.print( "\" action=\"" );
93
            out.print( "\" action=\"" );
94
            if ( action != null ) {
94
            if ( action != null ) {
95
                if ( action.length() > 0 && pageContext.getResponse() instanceof HttpServletResponse ) {
95
                if ( action.length() > 0 && pageContext.getResponse() instanceof HttpServletResponse ) {
Lines 104-110 Link Here
104
                out.print( "name=\"" + Util.quote(name) + "\" ");
104
                out.print( "name=\"" + Util.quote(name) + "\" ");
105
            }
105
            }
106
            if ( encType != null ) {
106
            if ( encType != null ) {
107
                out.print( "encType=\"" + encType + "\" " );
107
                out.print( "enctype=\"" + encType + "\" " );
108
            }
108
            }
109
109
110
            // include any attributes we've got here
110
            // include any attributes we've got here
Lines 122-128 Link Here
122
        }
122
        }
123
        return EVAL_BODY_INCLUDE;
123
        return EVAL_BODY_INCLUDE;
124
    }
124
    }
125
    
125
126
    public int doEndTag() throws JspException {
126
    public int doEndTag() throws JspException {
127
        try {
127
        try {
128
            JspWriter out = pageContext.getOut();
128
            JspWriter out = pageContext.getOut();
Lines 133-139 Link Here
133
        }
133
        }
134
        return EVAL_PAGE;
134
        return EVAL_PAGE;
135
    }
135
    }
136
    
136
137
    public void setName(String x) {
137
    public void setName(String x) {
138
        name = x;
138
        name = x;
139
    }
139
    }
Lines 141-155 Link Here
141
    public void setAttributes(Map x) {
141
    public void setAttributes(Map x) {
142
        attributes = x;
142
        attributes = x;
143
    }
143
    }
144
    
144
145
    public void setAttributesText( String x ) {
145
    public void setAttributesText( String x ) {
146
        attributesText = x;
146
        attributesText = x;
147
    }
147
    }
148
    
148
149
    public void setBean( String x ) {
149
    public void setBean( String x ) {
150
        beanId = x;
150
        beanId = x;
151
    }
151
    }
152
    
152
153
    public String getBean() {
153
    public String getBean() {
154
        return beanId;
154
        return beanId;
155
    }
155
    }
Lines 165-199 Link Here
165
    public void setEncType(String x) {
165
    public void setEncType(String x) {
166
        encType = x;
166
        encType = x;
167
    }
167
    }
168
    
168
169
    /** Getter for property name.
169
    /** Getter for property name.
170
     * @return Value of property name.
170
     * @return Value of property name.
171
     */
171
     */
172
    public String getName() { return name; }
172
    public String getName() { return name; }
173
    
173
174
    /** Getter for property method.
174
    /** Getter for property method.
175
     * @return Value of property method.
175
     * @return Value of property method.
176
     */
176
     */
177
    public String getMethod() { return method; }
177
    public String getMethod() { return method; }
178
    
178
179
    /** Getter for property encType.
179
    /** Getter for property encType.
180
     * @return Value of property encType.
180
     * @return Value of property encType.
181
     */
181
     */
182
    public String getEncType() { return encType; }
182
    public String getEncType() { return encType; }
183
    
183
184
    /** Getter for property attributesText.
184
    /** Getter for property attributesText.
185
     * @return Value of property attributesText.
185
     * @return Value of property attributesText.
186
     */
186
     */
187
    public String getAttributesText() { return attributesText; }
187
    public String getAttributesText() { return attributesText; }
188
    
188
189
    /** Getter for property attributes.
189
    /** Getter for property attributes.
190
     * @return Value of property attributes.
190
     * @return Value of property attributes.
191
     */
191
     */
192
    public Map getAttributes() { return attributes; }
192
    public Map getAttributes() { return attributes; }
193
    
193
194
    /** Getter for property action.
194
    /** Getter for property action.
195
     * @return Value of property action.
195
     * @return Value of property action.
196
     */
196
     */
197
    public String getAction() { return action; }
197
    public String getAction() { return action; }
198
    
198
199
}
199
}
(-)Form.orig (-2 / +2 lines)
Lines 89-95 Link Here
89
89
90
            // start building up the tag
90
            // start building up the tag
91
            out.print("<form method=\"" );
91
            out.print("<form method=\"" );
92
            out.print( method != null ? method : "GET" );
92
            out.print( method != null ? method : "get" );
93
            out.print( "\" action=\"" );
93
            out.print( "\" action=\"" );
94
            if ( action != null ) {
94
            if ( action != null ) {
95
                if ( action.length() > 0 && pageContext.getResponse() instanceof HttpServletResponse ) {
95
                if ( action.length() > 0 && pageContext.getResponse() instanceof HttpServletResponse ) {
Lines 104-110 Link Here
104
                out.print( "name=\"" + Util.quote(name) + "\" ");
104
                out.print( "name=\"" + Util.quote(name) + "\" ");
105
            }
105
            }
106
            if ( encType != null ) {
106
            if ( encType != null ) {
107
                out.print( "encType=\"" + encType + "\" " );
107
                out.print( "enctype=\"" + encType + "\" " );
108
            }
108
            }
109
109
110
            // include any attributes we've got here
110
            // include any attributes we've got here

Return to bug 25497