To use I18 Message resource in uiBinder you need to follow the same mechanism as that of ClientBundle
In your corresponding java class add @uiFactory method which will return the object of required Message interface e.g.
package com.test.module.client;
public interface Messages extends com.google.gwt.i18n.client.Messages {
@DefaultMessage("Home")
@Key("home")
String home();
}
public class MyUiBinder extends Composite{
......
.....
.....
@UiFactory
public static Messages getResources() {
return GWT.create(Messages.class);
}
}
And you can use the same inside corresponding MyUiBinder.ui.xml file as
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:with field='msg'
type='com.test.module.client.Messages' />
<g:HTMLPanel>
<g:Button text='{msg.home}'></g:Button>
......
......
......
</g:HTMLPanel>
</ui:UiBinder>
In your corresponding java class add @uiFactory method which will return the object of required Message interface e.g.
package com.test.module.client;
public interface Messages extends com.google.gwt.i18n.client.Messages {
@DefaultMessage("Home")
@Key("home")
String home();
}
public class MyUiBinder extends Composite{
......
.....
.....
@UiFactory
public static Messages getResources() {
return GWT.create(Messages.class);
}
}
And you can use the same inside corresponding MyUiBinder.ui.xml file as
<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<ui:with field='msg'
type='com.test.module.client.Messages' />
<g:HTMLPanel>
<g:Button text='{msg.home}'></g:Button>
......
......
......
</g:HTMLPanel>
</ui:UiBinder>
ReplyDeleteNhìn thấy ba người rời đi, hoàng y tu sĩ thở dài một hơi, trong ánh mắt thần sắc lạnh lùng, nói:
- Hạo Thiên môn Thiên tiên đệ tử toàn bộ rời khỏi Ngọc Hư sơn, còn lại mọi người cùng ta bảo vệ Hạo Thiên môn, khởi động hộ sơn đại trận, cho dù Bạch Thạch sơn kia đến Ngọc Hư sơn, chúng ta cũng muốn hắn phải trả giá đại giới.dongtam
game mu
http://nhatroso.net/
http://nhatroso.com/
nhac san cuc manh
tư vấn luật
dịch vụ thành lập công ty trọn gói
văn phòng luật
tổng đài tư vấn pháp luật
thành lập công ty
http://we-cooking.com/
chém gió
trung tâm ngoại ngữ
- Đại sư bá, chúng ta không đi, chúng ta cùng với Hạo Thiên môn cùng tồn vong.
- Đệ tử không đi, đệ tử cũng muốn vì Hạo Thiên môn góp một phần lực.
Hơn mười Địa tiên đều nói.
- Hảo, chúng ta chết vì Hạo Thiên môn, làm cho mọi người biết Hạo Thiên môn cũng không dễ dàng bị ép như vậy.
Hoàng y tu sĩ kiên nghị nói.
- Đáng tiếc sư phụ ngã xuống, chúng ta lại không thể báo thù cho sư phụ, nếu sư phụ còn, Bạch