|
RAMADDA User Guide
|
sb.append(HtmlUtil.formTable());
sb.append(HtmlUtil.formEntry("Subject:",
HtmlUtil.input(ARG_SUBJECT, subject,
HtmlUtil.SIZE_40)));
sb.append(HtmlUtil.formEntryTop("Comment:",
HtmlUtil.textArea(ARG_COMMENT,
comment, 5, 40)));
sb.append(HtmlUtil.formTableClose());
The formTable just creates a table with a certain padding. the formEntry method takes a label and some content. Note: if the content is tall (e.g., a text area) then use formEntryTop - this does a valign="top" in the table row so that the label is aligned at the top, not in the center.
You can add on an ARG_MESS url argument to show some response. e.g:
return new Result(HtmlUtil.url(URL_ENTRY_SHOW, ARG_ID,
entry.getId(), ARG_MESSAGE,
"Some message here"));
if (request.exists(ARG_MESSAGE)) {
sb.append(getRepository().note(request.getUnsafeString(ARG_MESSAGE, "")));
}
or:
sb.append(getRepository().warning("Some error"));