Rollback of r10726. It still causes brackage *** Original change description *** Change default of UiBinder.useLazyWidgetBuilders to true, in preparation for deleting the old code. Review at http://gwt-code-reviews.appspot.com/1577805 git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10727 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml b/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml index 21da6fc..749c0c9 100644 --- a/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml +++ b/user/src/com/google/gwt/uibinder/UiBinder.gwt.xml
@@ -27,11 +27,11 @@ <define-configuration-property name="UiBinder.useSafeHtmlTemplates" is-multi-valued="false"/> <set-configuration-property name="UiBinder.useSafeHtmlTemplates" value="true"/> - <!-- Set this property to false to revert to the old code gen strategy, - and lose features like support for LazyPanel and forward references. This - property will soon disappear. --> + <!-- UiBinder can be configured to use a new strategy that enables a faster + rendering mode and make some widgets lazily created. This is still experimental + but should be the default option in a soon future. --> <define-configuration-property name="UiBinder.useLazyWidgetBuilders" is-multi-valued="false"/> - <set-configuration-property name="UiBinder.useLazyWidgetBuilders" value="true"/> + <set-configuration-property name="UiBinder.useLazyWidgetBuilders" value="false"/> <generate-with class="com.google.gwt.uibinder.rebind.UiBinderGenerator"> <when-type-assignable class="com.google.gwt.uibinder.client.UiRenderer"/>
diff --git a/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java b/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java index 50c2dca..448cc52 100644 --- a/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java +++ b/user/src/com/google/gwt/uibinder/rebind/UiBinderGenerator.java
@@ -52,7 +52,6 @@ private static final String LAZY_WIDGET_BUILDERS_PROPERTY = "UiBinder.useLazyWidgetBuilders"; private static boolean gaveSafeHtmlWarning; - private static boolean gaveLazyBuildersWarning; /** * Given a UiBinder interface, return the path to its ui.xml file, suitable @@ -213,14 +212,7 @@ } private Boolean useLazyWidgetBuilders(MortalLogger logger, PropertyOracle propertyOracle) { - Boolean rtn = extractConfigProperty(logger, propertyOracle, LAZY_WIDGET_BUILDERS_PROPERTY, true); - if (!gaveLazyBuildersWarning && !rtn) { - logger.warn("Configuration property %s is false. Deprecated code generation is in play. " + - "This property will soon become a no-op.", - LAZY_WIDGET_BUILDERS_PROPERTY); - gaveLazyBuildersWarning = true; - } - return rtn; + return extractConfigProperty(logger, propertyOracle, LAZY_WIDGET_BUILDERS_PROPERTY, false); } private Boolean useSafeHtmlTemplates(MortalLogger logger, PropertyOracle propertyOracle) { @@ -229,8 +221,7 @@ if (!gaveSafeHtmlWarning && !rtn) { logger.warn("Configuration property %s is false! UiBinder SafeHtml integration is off, " - + "leaving your users more vulnerable to cross-site scripting attacks. This property " + - "will soon become a no-op, and SafeHtml integration will always be on.", + + "leaving your users more vulnerable to cross-site scripting attacks.", XSS_SAFE_CONFIG_PROPERTY); gaveSafeHtmlWarning = true; }
diff --git a/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java b/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java index 63241fa..9aba760 100644 --- a/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java +++ b/user/src/com/google/gwt/uibinder/rebind/UiBinderWriter.java
@@ -1006,7 +1006,7 @@ */ public String tokenForSafeUriExpression(XMLElement source, String expression) { if (!useSafeHtmlTemplates) { - return tokenForStringExpression(source, expression); + return tokenForStringExpression(source, expression + ".asString()"); } htmlTemplates.noteUri(expression);