~ubuntu-branches/ubuntu/lucid/libstruts1.2-java/lucid

« back to all changes in this revision

Viewing changes to src/share/org/apache/struts/taglib/html/TextareaTag.java

  • Committer: Bazaar Package Importer
  • Author(s): Arnaud Vandyck
  • Date: 2006-04-24 12:14:23 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20060424121423-naev53qigqgks0sa
Tags: 1.2.9-1
New upstream  release Fixes  three security  problems: CVE-2006-1546,
CVE-2006-1547,  CVE-2006-1548  (closes:  #360551),  thanks  to  Moritz
Muehlenhoff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Header: /home/cvs/jakarta-struts/src/share/org/apache/struts/taglib/html/TextareaTag.java,v 1.19 2004/03/14 06:23:46 sraeburn Exp $
3
 
 * $Revision: 1.19 $
4
 
 * $Date: 2004/03/14 06:23:46 $
 
2
 * $Id: TextareaTag.java 164530 2005-04-25 03:11:07Z niallp $ 
5
3
 *
6
 
 * Copyright 1999-2004 The Apache Software Foundation.
 
4
 * Copyright 1999-2005 The Apache Software Foundation.
7
5
 * 
8
6
 * Licensed under the Apache License, Version 2.0 (the "License");
9
7
 * you may not use this file except in compliance with the License.
27
25
/**
28
26
 * Custom tag for input fields of type "textarea".
29
27
 *
30
 
 * @version $Revision: 1.19 $ $Date: 2004/03/14 06:23:46 $
 
28
 * @version $Rev: 164530 $ $Date: 2005-04-25 04:11:07 +0100 (Mon, 25 Apr 2005) $
31
29
 */
32
30
public class TextareaTag extends BaseInputTag {
33
31
 
34
32
 
35
 
    // ----------------------------------------------------- Instance Variables
36
 
 
37
 
 
38
 
    /**
39
 
     * The name of the bean containing our underlying property.
40
 
     */
41
 
    protected String name = Constants.BEAN_KEY;
42
 
 
43
 
    public String getName() {
44
 
        return (this.name);
45
 
    }
46
 
 
47
 
    public void setName(String name) {
48
 
        this.name = name;
49
 
    }
50
 
 
 
33
    // ----------------------------------------------------- Constructor
 
34
 
 
35
    public TextareaTag () {
 
36
        super();
 
37
        doReadonly = true;
 
38
    }
51
39
 
52
40
    // --------------------------------------------------------- Public Methods
53
41
 
73
61
    protected String renderTextareaElement() throws JspException {
74
62
        StringBuffer results = new StringBuffer("<textarea");
75
63
        
76
 
        results.append(" name=\"");
77
 
        // @since Struts 1.1
78
 
        if (indexed) {
79
 
            prepareIndex(results, name);
80
 
        }
81
 
        results.append(property);
82
 
        results.append("\"");
83
 
        if (accesskey != null) {
84
 
            results.append(" accesskey=\"");
85
 
            results.append(accesskey);
86
 
            results.append("\"");
87
 
        }
88
 
        if (tabindex != null) {
89
 
            results.append(" tabindex=\"");
90
 
            results.append(tabindex);
91
 
            results.append("\"");
92
 
        }
93
 
        if (cols != null) {
94
 
            results.append(" cols=\"");
95
 
            results.append(cols);
96
 
            results.append("\"");
97
 
        }
98
 
        if (rows != null) {
99
 
            results.append(" rows=\"");
100
 
            results.append(rows);
101
 
            results.append("\"");
102
 
        }
 
64
        prepareAttribute(results, "name", prepareName());
 
65
        prepareAttribute(results, "accesskey", getAccesskey());
 
66
        prepareAttribute(results, "tabindex", getTabindex());
 
67
        prepareAttribute(results, "cols", getCols());
 
68
        prepareAttribute(results, "rows", getRows());
103
69
        results.append(prepareEventHandlers());
104
70
        results.append(prepareStyles());
 
71
        prepareOtherAttributes(results);
105
72
        results.append(">");
106
73
        
107
74
        results.append(this.renderData());