throw new NullPointerException();
}
if (!component.isRendered()) return;
ResponseWriter writer = context.getResponseWriter();
OutputLink comp = (OutputLink)component;
String href = RendererUtils.convertToString(context, component);
List child = component.getChildren();
for (int i = 0; i < child.size(); i++){ // insert parameters from UIParameter components
if (child.get(i) instanceof UIParameter){
href = insertParam(href, (UIParameter)child.get(i), writer.getCharacterEncoding());
}
}
href = context.getExternalContext().encodeResourceURL(href);
writer.startElement(Attributes.A, component);
RendererUtils.writeAttribute(Attributes.HREF, href, writer);
RendererUtils.writeAttribute(Attributes.ID, comp.getClientId(context), writer);
RendererUtils.writeAttribute(Attributes.CLASS, comp.getStyleClass(), writer);
RendererUtils.writeAttribute(Attributes.XML_LANG, comp.getXmllang(), writer);
RendererUtils.writeAttribute(Attributes.TITLE, comp.getTitle(), writer);
writer.flush();
}