Class WidgetPlaceholderInterpreter

java.lang.Object
com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter
com.google.gwt.uibinder.elementparsers.HtmlPlaceholderInterpreter
com.google.gwt.uibinder.elementparsers.WidgetPlaceholderInterpreter
All Implemented Interfaces:
com.google.gwt.uibinder.rebind.XMLElement.Interpreter<String>, com.google.gwt.uibinder.rebind.XMLElement.PostProcessingInterpreter<String>

class WidgetPlaceholderInterpreter extends HtmlPlaceholderInterpreter
Used by HTMLPanelParser. Refines HtmlPlaceholderInterpreter to allow widgets to appear inside msg elements in an HTMLPanel.

HasText and HasHTML get special treatment, where their innerText or innerHTML become part of the @Default value of the message being generated. E.g., this markup in an HTMLPanel:

 invalid input: '<'m:msg>Hello <gwt:HyperLink>click here</gwt:HyperLink> thank you.invalid input: '<'/m:msg>
becomes a message like this:
 @Default("Hello {0}click here{1} thank you.")
 String getMessage1(
   @Example("<span>") String widget1Begin,
   @Example("</span>") String widget1End
 );

The contents of other widget types are opaque to the message, and are covered by a single placeholder. One implication of this is that the content of an HTMLPanel inside a msg in another HTMLPanel must always be in a separate message.

  • Constructor Details

    • WidgetPlaceholderInterpreter

      WidgetPlaceholderInterpreter(String fieldName, com.google.gwt.uibinder.rebind.UiBinderWriter writer, com.google.gwt.uibinder.rebind.messages.MessageWriter message, String ancestorExpression)
  • Method Details