uibinder h1 translated

117 views
Skip to first unread message

clem...@gmail.com

unread,
May 31, 2015, 2:12:02 PM5/31/15
to google-we...@googlegroups.com
Hello.
I have a UiBinder xml that starts like this:

<!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent">

<ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder" xmlns:b="urn:import:org.gwtbootstrap3.client.ui" xmlns:b.html="urn:import:org.gwtbootstrap3.client.ui.html"

xmlns:r="urn:import:com.example.myproject.client.app.reuseWidgets.languagewidget" xmlns:g="urn:import:com.google.gwt.user.client.ui">

<ui:with field="nameTokens" type="com.example.myproject.client.place.NameTokens" />

<ui:with field="txt" type="com.example.myproject.client.translation.LandingPage" />

<ui:with field="w" type="com.example.myproject.client.app.welcome.WelcomeCss" />

<g:ScrollPanel>

<g:HTMLPanel>

<div class="navbar navbar-inverse navbar-fixed-top {w.w.navbar} {w.w.navbarInverse} " role="navigation">

.............................................

txt contains all the text for the page according to the selected language of the user. so I have this somewhere in the xml:

<li draggable="true">

<g:Anchor text="{txt.testimonialsHeader}" ui:field="headerTestimonials" styleName=""></g:Anchor>

</li>


my question is:

how can I write something like:

<h1> {txt.usersHeader}</h1>  

in the xml file and have the real text displayed? (cause when I put this in my xml file, the {txt.usersHeader} is not interpreted...)

I only want to know about the xml file of uibinder (I know that I can do it in java)

Jens

unread,
May 31, 2015, 2:54:28 PM5/31/15
to google-we...@googlegroups.com
<h1><ui:text from="{txt.usersHeader}" / ></h1>

should work I think.

-- J.

clem...@gmail.com

unread,
Jun 1, 2015, 8:15:54 AM6/1/15
to google-we...@googlegroups.com
thks.
it worked!
It's very clear on the documentation.... how did I miss that?
Reply all
Reply to author
Forward
0 new messages