Some GWT MVP newbie questions
I have worked with ASP.NET(C#, classic/MVC), Django(Python) and CI(php) but I am completely new to GWT and JSP/servlets, and I have been told to learn GWT MVP. So, I read a tutorial for GWT-MVP from google. I downloaded the project Contacts, which was used in that tutorial. After reading those, I could not figure out the whole thing. Here are my questions (I have eclipse-gallelio and gwt plugin/sdk installed):
- What are translatable codes, specified in contacts.gwt.xml file? Codes that should be translated to javascript? Or what? Which source tags should I include in there? How those paths (attribute) are mapped?
- I have found only a single static html file in the war folder (Contacts.html). It has the same name (with same letter case) as the project name has. Is it necessary/rule?
- How does RootPanel know, which html file to be wrapped? Is it configurable? If so, where?
- If I have multiple html files, how should I tell RootPanel to use one of those?
- If I have 2/3 nested master pages (like ASP.NET or django or CI), how can I join them to build a single html?
- Or, a project has only a single html?
For now, these are enough. May be these questions 开发者_JAVA百科are silly, but I have no idea about GWT-MVP. Thanks in advance.
- Translatable codes will be translated to JavaScript.
You should include everything that is needed on the client side. So if you have some object to transfer data from server to client and you have that in a package called "shared" you need to add a
<source path='shared'/>
to the contacts.gwt.xml file. - It doesn't have to be the same name as the project, if you want to change it you need to modify it in the war/web-inf/web.xml file (in the
<welcome-file-list>
tag) - In GWT you basically only have one html file and just change the widgets attached to the rootpanel. If you want to change the html check 2.
- check 6
- check 6
- yes
精彩评论