}
protected String getPredefinedMarker(FacesContext context, Object facetName) {
if (MARKERS_PREDEFINED.contains(facetName)) {
StringBuffer buff = new StringBuffer();
JSEncoder encoder = new JSEncoder();
String source = "<img alt=\"\" border=\"0\" width=\"16\" height=\"16\" src=\"" +
getResource("/org/richfaces/renderkit/html/images/" + facetName + ".gif").getUri(context, null) +"\" />";
char chars[] = source.toString().toCharArray();
for (int i = 0; i < chars.length; i++) {
char c = chars[i];
if (!encoder.compile(c)) {
buff.append(encoder.encode(c));
} else {
buff.append(c);
}
}
return buff.toString();