* and not when the Form is defined externally.
*
* @param buffer the StringBuffer to render to
*/
protected void renderButtons(HtmlStringBuffer buffer) {
Form form = getForm();
List buttonList = form.getButtonList();
if (!buttonList.isEmpty()) {
buffer.append("<table cellpadding=\"0\" cellspacing=\"0\"");
if (getAttribute("width") != null) {
buffer.appendAttribute("width", getAttribute("width"));
}
buffer.append("><tbody><tr><td");
buffer.appendAttribute("align", form.getButtonAlign());
buffer.append(">\n");
buffer.append("<table class=\"buttons\" id=\"");
buffer.append(getId());
buffer.append("-buttons\"><tbody>\n");
buffer.append("<tr class=\"buttons\">");
for (int i = 0, size = buttonList.size(); i < size; i++) {
buffer.append("<td class=\"buttons\"");
buffer.appendAttribute("style", form.getButtonStyle());
buffer.closeTag();
Button button = (Button) buttonList.get(i);
button.render(buffer);