//Revised from open ejb
public class HtmlUtilities {
public static final String ANCHOR_NAME_TYPE = "name";
public static final String ANCHOR_HREF_TYPE = "href";
//we don't want anyone creating new instances of this class
private HtmlUtilities() {
}
public static String createAnchor(String value, String display, String type) {
//our type must be one of these two
if (!(ANCHOR_HREF_TYPE.equals(type) || ANCHOR_NAME_TYPE.equals(type))) {
throw new IllegalArgumentException("The type argument must be either \"name\" or \"href\"");
}
return new StringBuffer(100)
.append("")
.append(display)
.append("")
.toString();
}
public static String createSelectFormField(String name, String onChange) {
StringBuffer temp = new StringBuffer(60).append("