@Override public void renderOn(HtmlCanvas html) throws IOException { html .head() .meta(charset("utf8")) .meta(name("viewport").content("width=device-width, initial-scale=1.0")) .title().content("GumTree") .macros().stylesheet("/dist/bootstrap.min.css") .macros().stylesheet("/dist/gumtree.css") ._head(); }
void generateHeader(HtmlCanvas reportPageBody, String cloudSlangImage) throws IOException { HtmlCanvas headerDiv = reportPageBody.div(new HtmlAttributes().id(HEADER_BAR_ID)); HtmlCanvas anchor = headerDiv.a(new HtmlAttributes().href(HTTP_CLOUD_SLANG_IO).target(BLANK)); HtmlCanvas img = new HtmlCanvas().img(new HtmlAttributes().src(cloudSlangImage).alt(CLOUD_SLANG_LOGO_ALT)); anchor.content(img.toHtml(), false); headerDiv._div(); reportPageBody.h1(new HtmlAttributes().class_(REPORT_TITLE_CLASS)).content(TEST_CASE_REPORT); }
void appendReportPageHead(HtmlCanvas reportPageHtml) throws IOException { HtmlCanvas reportPageHead = reportPageHtml.head(); reportPageHead.macros().javascript(GOOGLE_CHARTS_URL); reportPageHead.macros().javascript(CURRENT_DIRECTORY + RES + SLASH + PIECHART_JS); reportPageHead.macros().stylesheet(CURRENT_DIRECTORY + RES + SLASH + BASIC_REPORT_CSS); reportPageHead._head(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .macros().javascript("/dist/jquery.min.js") .macros().javascript("/dist/bootstrap.min.js"); }
/** * @param html * @return a ContextMap to access the parameters of the inbound Http request. */ public static ContextMap getParameters(HtmlCanvas html) { return html.getPageContext().getContextMap(PageContext.REQUEST_PARAMETERS); } /**
/** * * @param html * @return the actual path of the inbound Http request. */ public static String getPath(HtmlCanvas html) { return html.getPageContext().getString(PageContext.REQUEST_PATH); } /**
@Override public void renderOn(HtmlCanvas html) throws IOException { html .head() .meta(charset("utf8")) .meta(name("viewport").content("width=device-width, initial-scale=1.0")) .title().content("GumTree") .macros().stylesheet("/dist/bootstrap.min.css") .macros().stylesheet("/dist/gumtree.css") ._head(); }
@Override public void renderOn(HtmlCanvas html) throws IOException { html .macros().javascript("/dist/jquery.min.js") .macros().javascript("/dist/bootstrap.min.js"); }
/** * * @param html * @return a ContextMap to access the Cookies passed in by the inbound Http request. */ public static ContextMap getCookies(HtmlCanvas html) { return html.getPageContext().getContextMap(PageContext.REQUEST_COOKIES); } /**
/** * Return the full undecoded URL. * @param html * @return */ public static String getRequestURLAndQuery(HtmlCanvas html) { return html.getPageContext().getString(PageContext.REQUEST_URIQ); } }
/** * * @param html * @return a ContextMap to access the session associated to the inbound request. */ public static ContextMap getSession(HtmlCanvas html) { return html.getPageContext().getContextMap(PageContext.SESSION); } /**