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 $
4
* $Date: 2004/03/14 06:23:46 $
2
* $Id: TextareaTag.java 164530 2005-04-25 03:11:07Z niallp $
6
* Copyright 1999-2004 The Apache Software Foundation.
4
* Copyright 1999-2005 The Apache Software Foundation.
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.
28
26
* Custom tag for input fields of type "textarea".
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) $
32
30
public class TextareaTag extends BaseInputTag {
35
// ----------------------------------------------------- Instance Variables
39
* The name of the bean containing our underlying property.
41
protected String name = Constants.BEAN_KEY;
43
public String getName() {
47
public void setName(String name) {
33
// ----------------------------------------------------- Constructor
35
public TextareaTag () {
52
40
// --------------------------------------------------------- Public Methods
73
61
protected String renderTextareaElement() throws JspException {
74
62
StringBuffer results = new StringBuffer("<textarea");
76
results.append(" name=\"");
79
prepareIndex(results, name);
81
results.append(property);
83
if (accesskey != null) {
84
results.append(" accesskey=\"");
85
results.append(accesskey);
88
if (tabindex != null) {
89
results.append(" tabindex=\"");
90
results.append(tabindex);
94
results.append(" cols=\"");
99
results.append(" rows=\"");
100
results.append(rows);
101
results.append("\"");
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(">");
107
74
results.append(this.renderData());