/** * Creates a {@link Td} element with the specified child nodes. * * @param children The child nodes. * @return The new element. */ public static final Td td(Object...children) { return td().children(children); }
/** * Creates an empty {@link Td} element. * * @return The new element. */ public static final Td td() { return new Td(); }
/** * {@doc HTML5.tabular-data#attr-tdth-headers headers} attribute. * * <p> * The header cells for this cell. * * @param headers The new value for this attribute. * @return This object (for method chaining). */ public final Td headers(String headers) { attr("headers", headers); return this; }
@RestMethod( name=GET, path="/edit", summary="Render form entry page for editing config file", description="Renders a form entry page for editing the raw text of a config file." ) public Form getConfigEditForm() { return form().id("form").action("servlet:/").method("POST").enctype("application/x-www-form-urlencoded").children( div()._class("data").children( table( tr(td().style("text-align:right").children(button("submit","Submit"),button("reset","Reset"))), tr(th().child("Contents")), tr(th().child( textarea().name("contents").rows(40).cols(120).style("white-space:pre;word-wrap:normal;overflow-x:scroll;font-family:monospace;") .text(getServletConfig().getConfig().toString())) ) ) ) ); }
private Div headers(Session s, ResponseInfo ri) { if (! ri.hasHeaders()) return null; Table sectionTable = table(tr(th("Name"),th("Description"),th("Schema")))._class("section-table"); Div headers = div( div("Headers:")._class("section-name"), sectionTable )._class("headers"); for (Map.Entry<String,HeaderInfo> e : ri.getHeaders().entrySet()) { String name = e.getKey(); HeaderInfo hi = e.getValue(); sectionTable.child( tr( td(name)._class("name"), td(toBRL(hi.getDescription()))._class("description"), td(hi.asMap().keepAll("type","format","items","collectionFormat","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf")) ) ); } return headers; }
@RestMethod( name=GET, path="/edit", summary="Render form entry page for editing config file", description="Renders a form entry page for editing the raw text of a config file." ) public Form getConfigEditForm() { return form().id("form").action("servlet:/").method("POST").enctype("application/x-www-form-urlencoded").children( div()._class("data").children( table( tr(td().style("text-align:right").children(button("submit","Submit"),button("reset","Reset"))), tr(th().child("Contents")), tr(th().child( textarea().name("contents").rows(40).cols(120).style("white-space:pre;word-wrap:normal;overflow-x:scroll;font-family:monospace;") .text(getServletConfig().getConfig().toString())) ) ) ) ); }
private Div headers(Session s, ResponseInfo ri) { if (! ri.hasHeaders()) return null; Table sectionTable = table(tr(th("Name"),th("Description"),th("Schema")))._class("section-table"); Div headers = div( div("Headers:")._class("section-name"), sectionTable )._class("headers"); for (Map.Entry<String,HeaderInfo> e : ri.getHeaders().entrySet()) { String name = e.getKey(); HeaderInfo hi = e.getValue(); sectionTable.child( tr( td(name)._class("name"), td(toBRL(hi.getDescription()))._class("description"), td(hi.asMap().keepAll("type","format","items","collectionFormat","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf")) ) ); } return headers; }
/** * Creates a {@link Td} element with the specified child nodes. * * @param children The child nodes. * @return The new element. */ public static final Td td(Object...children) { return td().children(children); }
/** * {@doc HTML5.tabular-data#attr-tdth-headers headers} attribute. * * <p> * The header cells for this cell. * * @param headers The new value for this attribute. * @return This object (for method chaining). */ public final Td headers(String headers) { attr("headers", headers); return this; }
private Div headers(Session s, ResponseInfo ri) { if (! ri.hasHeaders()) return null; Table sectionTable = table(tr(th("Name"),th("Description"),th("Schema")))._class("section-table"); Div headers = div( div("Headers:")._class("section-name"), sectionTable )._class("headers"); for (Map.Entry<String,HeaderInfo> e : ri.getHeaders().entrySet()) { String name = e.getKey(); HeaderInfo hi = e.getValue(); sectionTable.child( tr( td(name)._class("name"), td(toBRL(hi.getDescription()))._class("description"), td(hi.asMap().keepAll("type","format","items","collectionFormat","default","maximum","exclusiveMaximum","minimum","exclusiveMinimum","maxLength","minLength","pattern","maxItems","minItems","uniqueItems","enum","multipleOf")) ) ); } return headers; }
/** * Creates an empty {@link Td} element. * * @return The new element. */ public static final Td td() { return new Td(); }
@Override /* Widget */ public Object getContent(RestRequest req) throws Exception { return div( form().id("form").action("servlet:/store/order").method(POST).children( table( tr( th("Pet:"), td( select().id("addPet_names").name("petId") ), td(new Tooltip("❓", "The pet to purchase.")) ), tr( th("Ship date:"), td(input().name("shipDate").type("date")), td(new Tooltip("❓", "The requested ship date.")) ), tr( td().colspan(2).style("text-align:right").children( button("reset", "Reset"), button("submit", "Submit") ) ) ).style("white-space:nowrap") ) ); } }
/** * Creates a {@link Td} element with the specified child nodes. * * @param children The child nodes. * @return The new element. */ public static final Td td(Object...children) { return td().children(children); }
/** * {@doc HTML5.tabular-data#attr-tdth-colspan colspan} attribute. * * <p> * Number of columns that the cell is to span. * * @param colspan * The new value for this attribute. * Typically a {@link Number} or {@link String}. * @return This object (for method chaining). */ public final Td colspan(Object colspan) { attr("colspan", colspan); return this; }