return null;
}
@Override
protected void doService(final ToolPageContext page) throws IOException, ServletException {
History history = Query.
from(History.class).
where("_id = ?", page.param(UUID.class, "id")).
first();
if (page.isFormPost()) {
try {
history.setName(page.param(String.class, "name"));
history.save();
page.writeStart("script", "type", "text/javascript");
page.write("window.location = window.location;");
page.writeEnd();
return;
} catch (Exception error) {
page.getErrors().add(error);
}
}
page.writeHeader();
page.writeStart("div", "class", "widget");
page.writeStart("h1", "class", "icon icon-object-history");
page.writeHtml("Name Revision");
page.writeEnd();
page.include("/WEB-INF/errors.jsp");
page.writeStart("form",
"method", "post",
"action", page.url(""));
page.writeStart("div", "class", "inputContainer");
page.writeStart("div", "class", "inputLabel");
page.writeStart("label", "for", page.createId()).writeHtml("Name").writeEnd();
page.writeEnd();
page.writeStart("div", "class", "inputSmall");
page.writeElement("input",
"type", "text",
"id", page.getId(),
"name", "name",
"value", history.getName());
page.writeEnd();
page.writeEnd();
page.writeStart("div", "class", "actions");
page.writeStart("button",