/** * Creates a {@link Script} element with the specified {@link Script#type(String)} attribute and * {@link Script#text(Object)} node. * * @param type The {@link Script#type(String)} attribute. * @param text The child text node. * @return The new element. */ public static final Script script(String type, String...text) { return script().type(type).text(joinnl(text)); }
/** * Creates a {@link Script} element with the specified {@link Script#type(String)} attribute and * {@link Script#text(Object)} node. * * @param type The {@link Script#type(String)} attribute. * @param text The child text node. * @return The new element. */ public static final Script script(String type, String...text) { return script().type(type).text(joinnl(text)); }
/** * Creates a {@link Script} element with the specified {@link Script#type(String)} attribute and * {@link Script#text(Object)} node. * * @param type The {@link Script#type(String)} attribute. * @param text The child text node. * @return The new element. */ public static final Script script(String type, String...text) { return script().type(type).text(joinnl(text)); }
@RestMethod( summary="Initialize database form entry page" ) public Div getInit() { return div( form("servlet:/init").method(POST).target("buf").children( table( tr( th("Initialize petstore database:"), td(input("radio").name("init-method").value("direct").checked(true), "direct", input("radio").name("init-method").value("rest"), "rest"), td(button("submit", "Submit").style("float:right").onclick("scrolling=true")) ) ) ), br(), iframe().id("buf").name("buf").style("width:800px;height:600px;").onload("window.parent.scrolling=false;"), script("text/javascript", "var scrolling = false;", "function scroll() { if (scrolling) { document.getElementById('buf').contentWindow.scrollBy(0,50); } setTimeout('scroll()',200); } ", "scroll();" ) ); }
@RestMethod( summary="Initialize database form entry page" ) public Div getInit() { return div( form("servlet:/init").method(POST).target("buf").children( table( tr( th("Initialize petstore database:"), td(input("radio").name("init-method").value("direct").checked(true), "direct", input("radio").name("init-method").value("rest"), "rest"), td(button("submit", "Submit").style("float:right").onclick("scrolling=true")) ) ) ), br(), iframe().id("buf").name("buf").style("width:800px;height:600px;").onload("window.parent.scrolling=false;"), script("text/javascript", "var scrolling = false;", "function scroll() { if (scrolling) { document.getElementById('buf').contentWindow.scrollBy(0,50); } setTimeout('scroll()',200); } ", "scroll();" ) ); }
script("text/javascript", new String[]{RESOURCES.getString("SwaggerUI.js")}), header(s) )._class("swagger-ui");
script("text/javascript", new String[]{RESOURCES.getString("SwaggerUI.js")}), header(s) )._class("swagger-ui");
script("text/javascript", new String[]{RESOURCES.getString("SwaggerUI.js")}), header(s) )._class("swagger-ui");
script("text/javascript", "// Quick and dirty function to allow tabs in textarea.", "function checkTab(e) {",
script("text/javascript", "// Quick and dirty function to allow tabs in textarea.", "function checkTab(e) {",
"Script", Script.class, script("text/javascript", new String[]{"\n\talert('hello world!');\n"}),