/** * Writes a new SafeHtml template to the generated BinderImpl. * * @return The invocation of the SafeHtml template function with the arguments * filled in */ public String declareTemplateCall(String html, String fieldName) throws IllegalArgumentException { if (!useSafeHtmlTemplates) { return '"' + html + '"'; } FieldWriter w = fieldManager.lookup(fieldName); HtmlTemplateMethodWriter templateMethod = htmlTemplates.addSafeHtmlTemplate(html, tokenator); if (useLazyWidgetBuilders) { w.setHtml(templateMethod.getIndirectTemplateCall()); } else { w.setHtml(templateMethod.getDirectTemplateCall()); } return w.getHtml(); }
/** * Writes a new SafeHtml template to the generated BinderImpl. * * @return The invocation of the SafeHtml template function with the arguments * filled in */ public String declareTemplateCall(String html, String fieldName) throws IllegalArgumentException { if (!useSafeHtmlTemplates) { return '"' + html + '"'; } FieldWriter w = fieldManager.lookup(fieldName); HtmlTemplateMethodWriter templateMethod = htmlTemplates.addSafeHtmlTemplate(html, tokenator); if (useLazyWidgetBuilders) { w.setHtml(templateMethod.getIndirectTemplateCall()); } else { w.setHtml(templateMethod.getDirectTemplateCall()); } return w.getHtml(); }
/** * Writes a new SafeHtml template to the generated BinderImpl. * * @return The invocation of the SafeHtml template function with the arguments * filled in */ public String declareTemplateCall(String html, String fieldName) throws IllegalArgumentException { if (!useSafeHtmlTemplates) { return '"' + html + '"'; } FieldWriter w = fieldManager.lookup(fieldName); HtmlTemplateMethodWriter templateMethod = htmlTemplates.addSafeHtmlTemplate(html, tokenator); if (useLazyWidgetBuilders) { w.setHtml(templateMethod.getIndirectTemplateCall()); } else { w.setHtml(templateMethod.getDirectTemplateCall()); } return w.getHtml(); }
/** * Writes a new SafeHtml template to the generated BinderImpl. * * @return The invocation of the SafeHtml template function with the arguments * filled in */ public String declareTemplateCall(String html, String fieldName) throws IllegalArgumentException { if (!useSafeHtmlTemplates) { return '"' + html + '"'; } FieldWriter w = fieldManager.lookup(fieldName); HtmlTemplateMethodWriter templateMethod = htmlTemplates.addSafeHtmlTemplate(html, tokenator); if (useLazyWidgetBuilders) { w.setHtml(templateMethod.getIndirectTemplateCall()); } else { w.setHtml(templateMethod.getDirectTemplateCall()); } return w.getHtml(); }