GWT 2.7.0

com.google.gwt.uibinder.elementparsers
Class WidgetPlaceholderInterpreter

java.lang.Object
  extended by com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter
      extended by com.google.gwt.uibinder.elementparsers.HtmlPlaceholderInterpreter
          extended by com.google.gwt.uibinder.elementparsers.WidgetPlaceholderInterpreter
All Implemented Interfaces:
com.google.gwt.uibinder.rebind.XMLElement.Interpreter<java.lang.String>, com.google.gwt.uibinder.rebind.XMLElement.PostProcessingInterpreter<java.lang.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:

 Hello <gwt:HyperLink>click here</gwt:HyperLink> thank you.
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.


Field Summary
 
Fields inherited from class com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter
message, tokenator, uiWriter
 
Constructor Summary
WidgetPlaceholderInterpreter(java.lang.String fieldName, com.google.gwt.uibinder.rebind.UiBinderWriter writer, com.google.gwt.uibinder.rebind.messages.MessageWriter message, java.lang.String ancestorExpression)
           
 
Method Summary
 java.lang.String interpretElement(com.google.gwt.uibinder.rebind.XMLElement elem)
           
 java.lang.String postProcess(java.lang.String consumed)
          Called by XMLElement.consumeInnerHtml(com.google.gwt.uibinder.rebind.XMLElement.Interpreter) after all elements have been handed to interpretElement(com.google.gwt.uibinder.rebind.XMLElement).
 
Methods inherited from class com.google.gwt.uibinder.elementparsers.HtmlPlaceholderInterpreter
consumePlaceholderInnards, nextClosePlaceholder, nextOpenPlaceholder
 
Methods inherited from class com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter
nextPlaceholder, stripTokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WidgetPlaceholderInterpreter

WidgetPlaceholderInterpreter(java.lang.String fieldName,
                             com.google.gwt.uibinder.rebind.UiBinderWriter writer,
                             com.google.gwt.uibinder.rebind.messages.MessageWriter message,
                             java.lang.String ancestorExpression)
Method Detail

interpretElement

public java.lang.String interpretElement(com.google.gwt.uibinder.rebind.XMLElement elem)
                                  throws UnableToCompleteException
Specified by:
interpretElement in interface com.google.gwt.uibinder.rebind.XMLElement.Interpreter<java.lang.String>
Overrides:
interpretElement in class HtmlPlaceholderInterpreter
Throws:
UnableToCompleteException

postProcess

public java.lang.String postProcess(java.lang.String consumed)
                             throws UnableToCompleteException
Called by XMLElement.consumeInnerHtml(com.google.gwt.uibinder.rebind.XMLElement.Interpreter) after all elements have been handed to interpretElement(com.google.gwt.uibinder.rebind.XMLElement).

Specified by:
postProcess in interface com.google.gwt.uibinder.rebind.XMLElement.PostProcessingInterpreter<java.lang.String>
Overrides:
postProcess in class com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter
Throws:
UnableToCompleteException

GWT 2.7.0