3

I am able to create and run a simple GWT application by creating all the files myself. It works fine and I am able to see the correct display.

I tried playing around the code to enhance my knowledge. What I noticed is that, once I run my app with say module rename to value "testhistory" it works fine.

But after that if I change rename to's value to say "historytokentest" the app gives errors like "Unable to find 'testhistory.gwt.xml' on your classpath; could be a typo, or maybe you forgot to include a classpath entry for source?"

If I change the rename to's value back to "testhistory" it again works fine.

Can anyone clear whether there is any relation between entryPoint class name, .gwt.xml file name, module rename to's value & also project name. Can they be changed in the future? (I know its not good to do so but just clearing doubts)

abhihello123
  • 1,668
  • 1
  • 22
  • 38

2 Answers2

7

If you change the rename-to, it'll change the name of the output files, so you have to update your <script> tag in your HTML host page (from src="testhistory/testhistory.nocache.js" to src="historytokentest/historytokentest.nocache.js"). You don't have to change anything else.

Thomas Broyer
  • 64,353
  • 7
  • 91
  • 164
0

Everything can be changed. There will not be any problem if you change the project.

If you want to change/rename your entry point make sure that you are doing it at [modulename].gwt.xml also. Mostly few smarter IDE's will take care of this once you do rename.

Same way for module name changing you have to change it in host page. Nothing extra than that.

DonX
  • 16,093
  • 21
  • 75
  • 120
  • thanks for the reply! I am using History.newItem(someTokenString) but it doesn't fire onValueChange() for the first time. If I use History.fireCurrentHistoryState then I am able to call; but according to google docs History.newItem(someTokenString) should have called. Im using Chrome for dev mode. – abhihello123 Dec 16 '11 at 13:55
  • Are you sure you are calling History.newItem(someTokenString) after adding value change handler? Just incase if you are doing it before it will not work. – DonX Dec 16 '11 at 15:15
  • Im using somethng like this. Im sure Dinesh. public void onModuleLoad() { History.addValueChangeHandler(this); //some code History.newItem(startToken,true); //some code } – abhihello123 Dec 16 '11 at 16:08