[cvs] expresso commit by ppilgrim: Added Struts 1.2.6 methods
`prepareName()'
JCorporate Ltd
jcorp at jcorporate.com
Wed Mar 9 02:10:51 UTC 2005
Log Message:
-----------
Added Struts 1.2.6 methods `prepareName()' and `prepareValue()' to
this base class.
Modified Files:
--------------
expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html:
ExBaseFieldTag.java
Revision Data
-------------
Index: ExBaseFieldTag.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExBaseFieldTag.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExBaseFieldTag.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExBaseFieldTag.java -u -r1.14 -r1.15
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExBaseFieldTag.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/ext/struts/taglib/html/ExBaseFieldTag.java
@@ -228,4 +228,48 @@
buffer.append("\"");
}
}
+
+ /**
+ * Prepare the name element
+ * @return The element name.
+ */
+ protected String prepareName() throws JspException {
+
+ if (property == null) {
+ return null;
+ }
+
+ // * @since Struts 1.1
+ if(indexed) {
+ StringBuffer results = new StringBuffer();
+ prepareIndex(results, name);
+ results.append(property);
+ return results.toString();
+ }
+
+ return property;
+
+ }
+
+ /**
+ * Render the value element
+ * @param results The StringBuffer that output will be appended to.
+ */
+ protected void prepareValue(StringBuffer results) throws JspException {
+
+ results.append(" value=\"");
+ if (value != null) {
+ results.append(this.formatValue(value));
+
+ } else if (redisplay || !"password".equals(type)) {
+ Object value =
+ TagUtils.getInstance().lookup(pageContext, name, property, null);
+
+ results.append(this.formatValue(value));
+ }
+
+ results.append('"');
+
+ }
+
}
More information about the cvs
mailing list