[Opensource] Expresso InputTag treats Readonly attribute as Hidden (fix included)
Ken Chow
kckc at shaw.ca
Mon Jan 20 11:58:27 PST 2003
The Expresso 5.01/5.02 InputTag treats the Readonly attribute the same as a Hidden attribute.
Is this a bug or was there a reason for this?
I've fixed the problem in InputTag.java as follows:
- changed
} else if (Input.ATTRIBUTE_HIDDEN.equalsIgnoreCase(typeToUse) ||
Input.ATTRIBUTE_READONLY.equalsIgnoreCase(typeToUse)) {
this.buildHiddenBox(writer);
to
} else if (Input.ATTRIBUTE_HIDDEN.equalsIgnoreCase(typeToUse)) {
this.buildHiddenBox(writer);
} else if (Input.ATTRIBUTE_READONLY.equalsIgnoreCase(typeToUse)) {
this.buildReadonlyBox(writer);
- added
/**
* Build a readonly text field
*
* @param writer the Jsp Writer
* @throws Exception upon error
*/
private void buildReadonlyBox(JspWriter writer)
throws Exception {
if (writer == null) {
throw new Exception("JspWriter was null");
}
FastStringBuffer fsb = FastStringBuffer.getInstance();
try {
fsb.append(" <input type=\"text\" name=\"");
fsb.append(nameToUse);
fsb.append("\" size=\"");
fsb.append(sizeToUse);
fsb.append("\" maxlength=\"");
fsb.append(maxlengthToUse);
fsb.append("\" value=\"" );
fsb.append(valueToUse);
fsb.append("\" readonly>" );
writer.print(fsb.toString());
} finally {
fsb.release();
}
} /* buildReadonlyBox(JSPWriter) */
Ken Chow
ken_chow at shaw.ca
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.jcorporate.com/pipermail/opensource/attachments/20030120/40e3c205/attachment-0002.htm
More information about the Opensource
mailing list