On 17 March 2011 17:20, ss.require <ss.requ...@gmail.com> wrote:
> Let's assume I need to paste some piece of html in my page: e.g.
> <div>
>    Hello, MAX
>  </div>
> Where "MAX" is a parameter.
>
> If I would do that in the code I would make the next function:
> public String getHtmlTemplate(String parameter){
>     return "<div>
>    Hello, " + parameter + "
>  </div>"
> }
>
> But If I would use uibinder I should make the next:
> <ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'>
>  <div>
>    Hello, <span ui:field='nameSpan'/>.
>  </div>
> </ui:UiBinder>
> +
> declare @UiField SpanElement nameSpan; + call
> nameSpan.setInnerText(name).
>
> I think the first approach is simpler, has less code and more
> effective(no need extra calls to js object-elements). However, the
> first approach is maybe less  maintainable.
>
> So, in general I think it's better to do html-template in the source
> code than uibinder templates! Why does GWT not handle placeholders? I
> don't see any hindrances to implement that for GWT. What do others
> think about uibinder?

Go with UiBinder. Use InlineLabel and simply call setText.

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to 
google-web-toolkit+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to