@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();" ) ); }