1. The java.util.Properties class isn't available on the client side. It's 
possible to get a properties file to the client side (e.g. 
using com.google.gwt.http.client.RequestBuilder), but you'd have to find a 
way to parse it. So why not use JSON format instead? Or GWT-RPC (which can 
contain the ids as a Collection or Map, or whatever you need)?

2. It sounds as if you don't have any control over your host page, but if 
you do, it would be more efficient to put the data directly there, similar 
to the example in 
http://google-web-toolkit.googlecode.com/svn/javadoc/latest/com/google/gwt/i18n/client/Dictionary.html.
 
This way you wouldn't need to make the extra server request.

3. Another possibility would be to have the values directly in your GWT 
client side source code. This would however require a re-compile of your 
client code, and a reload by the user. If you choose this option, and you 
still want a Properties file or something, you can use a TextResource to 
directly include it with the GWT JavaScript file 
(see 
https://developers.google.com/web-toolkit/doc/latest/DevGuideClientBundle#TextResource)


On Friday, September 14, 2012 9:37:18 PM UTC+2, Deepak Singh wrote:
>
> Hi,
>
> I have some div id's in my host html page. Which might change regularly, 
> based on that we will show / hide some content.
> I need to manage this requirement.
>
> I thought to update the id's in a properties file on client side and the 
> file will be read on client side and shows / hides the content based on 
> id's found in properties file.
>
> Is it a good approach ?
>
> If yes, how to use properties file ?
>
> Regards
> Deepak Singh
>  

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/tdzrZsZ6hacJ.
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