/*
* Returns the HTML code for a form to insert data into the db cluster.
*/
private String serveInsertForm(String insertResult)
{
HTMLFormatter formatter = new HTMLFormatter();
formatter.appendLine("<BR><fieldset>\n<legend>Insert data into the cluster</legend>\n");
formatter.appendLine("<FORM action=\"" + StorageService.getHostUrl() + "/home?" + INSERT + "=T\" method=\"post\">");
// get the list of column families
Table table = Table.open("Mailbox");
Set<String> columnFamilyComboBoxSet = table.getColumnFamilies();
formatter.append("insert into ");
formatter.addCombobox(columnFamilyComboBoxSet, "columnfamily", 0);
formatter.append(" : <INPUT name=columnName>");
formatter.append(" data = <INPUT name=data>");
formatter.appendLine(" where key = <INPUT name=key>\n");
formatter.appendLine("<BR>\n");
formatter.appendLine("<INPUT type=\"submit\" value=\"Send\"> <INPUT type=\"reset\">\n");
formatter.appendLine("</FORM>\n");
formatter.addDivElement(INSERTRESULTSDIV, insertResult);
formatter.appendLine("</fieldset>\n<BR>\n");
return formatter.toString();
}