I am building a GWT app using Mongo for persistence. This web app has static content such as “Terms & Conditions”, “Help”, “FAQ”, etc. This static content has to be editable via an admin console either by uploading newer versions or editing online.
My questions are…
* In what format should I store this static content?
* How can I display this static (yet dynamic) content in my GWT app?
* Should I store these files in Mongo or the file system?
* Is it better to have admins upload edited content or have them edit online?
Any advice is greatly appreciated.
Thanks!
GWT provides a great solution for this problem: ExternalTextResource:
https://developers.google.com/web-toolkit/doc/latest/DevGuideClientBundle#TextResource
You simply create HTML files with your texts, and provide references to these files as external text resources. You can edit these HTML files any way you like it.
The examples in the Developer Guide show setText() on TextArea, but in your case you should use HTML widget with setHtml().