}
@Override
public void encodeChildren(FacesContext context, UIComponent component) throws IOException {
ResponseWriter writer = context.getResponseWriter();
FileAttachments fileAttachments = (FileAttachments) component;
final String clientId = fileAttachments.getClientId(context);
ChildData childData = getChildData(fileAttachments);
writer.startElement("table", fileAttachments);
writer.writeAttribute("id", clientId + ATTACHMENTS_LIST_ID, null);
TableStructure tableStructure = childData.getTableStructure();
TableHeader tableHeader = tableStructure.getHeader();
if (tableHeader.isContentSpecified()) {
tableHeader.render(context, null);
}
writer.startElement("tbody", fileAttachments);
renderRows(context, fileAttachments, childData, fileAttachments.getValue());
writer.endElement("tbody");
TableFooter tableFooter = tableStructure.getFooter();
if (tableFooter.isContentSpecified()) {
tableFooter.render(context, null);