从GWT中的属性文件获取密钥的值 [英] get value of key from properties file in GWT

查看:101
本文介绍了从GWT中的属性文件获取密钥的值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何从基于GWT中的键的属性文件获取值。我有两个属性文件,一个是英文文件,另一个是法文文件。我想通过使用mouseover事件从属性文件中获取值来添​​加图标的工具提示。



我可以做到这一点吗?



请帮助解决方案

您需要首先创建一个接口,名称与属性文件相同,扩展由GWT提供的内置Constants接口。方法名称必须与.properties文件中使用的标记名称匹配



链接可能会对您有所帮助。然后在mouseOver事件处理程序中获取String。希望这有助于。


How can i get a value from properties file based on key in GWT. I have two properties files one is for English and other for French.I want to add a tooltip for the icon by getting the value from properties file using mouseover event.

How can i achieve this?

Please help.

解决方案

You need to create an interface first, with the same name as of properties file, extending the built-in Constants interface provided by GWT. Method names must match the tag names uses in the .properties files

This link might help you. Then get the String in your mouseOver event handler. Hope this helps.

这篇关于从GWT中的属性文件获取密钥的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆