}
AreaComponent area = (AreaComponent) component;
String targetImageId = area.findComponent(area.getTargetImage())
.getClientId(context);
ImageArea iarea = (ImageArea) area.getValue();
ResponseWriter writer = context.getResponseWriter();
StringBuffer sb = null;
writer.startElement("area", area);
writer.writeAttribute(
"alt",
iarea.getAlt(),
"alt");
writer.writeAttribute(
"coords",
iarea.getCoords(),
"coords");
writer.writeAttribute(
"shape",
iarea.getShape(),
"shape");
sb = new StringBuffer("document.forms[0]['").append(targetImageId)
.append("'].src='");
sb.append(
getURI(
context,
(String) area.getAttributes().get("onmouseout")));
sb.append("'");
writer.writeAttribute(
"onmouseout",
sb.toString(),
"onmouseout");
sb = new StringBuffer("document.forms[0]['").append(targetImageId)
.append("'].src='");
sb.append(
getURI(
context,
(String) area.getAttributes().get("onmouseover")));
sb.append("'");
writer.writeAttribute(
"onmouseover",
sb.toString(),
"onmouseover");
sb = new StringBuffer("document.forms[0]['");
sb.append(getName(context, area));
sb.append("'].value='");
sb.append(iarea.getAlt());
sb.append("'; document.forms[0].submit()");
writer.writeAttribute(
"onclick",
sb.toString(),
"value");