Coding References and Links
Short Coding Notes
CTRL+1 (Quick Fix) to give choices to fix code under cursor. Be careful although to select right things, like packages, usually com.vaadin.*.
CTRL+SPACE to complete names.
/?restartApplication in end of browser URL field to refresh vaadin servlet in tomcat to make changes effective.
WebContent/WEB-INF/lib is the place store additional .jar:s.
Keep code formatted and clean on eclipse file CTRL-A and CTRL-SHIFT-F to format code automatically.
- GoodNews Sample Code and two jar's are neeeded as well to put them into MyProject/WebContent/WEB-INF/lib folder:
- https://rome.dev.java.net/ rome-1.0.jar
- http://www.jdom.org/dist/binary/ and jdom-1.1.1.zip. Open zip and take jdom.jar from jdom/build folder.
- OR on eclipse
- Create vaadin project GoodNews
- File→Import, General→Archive File, select goodnews.zip and finish ⇒ GoodNews/GoodNews/ folder is created
- Move files from GoodNews/GoodNews/WebContent/WEB-INF/lib/ to GoodNews/WebContent/WEB-INF/lib
- Move files from GoodNews/GoodNews/src/com/example/goodnews to com.example.goodnews
- GoodNews/GoodNews can be deleted
- For simple “key=value” case use Java Properties file
- db4o is is also simple solution without annotations
- If you are targeting Google App Engine use JDO or JPA and read: http://code.google.com/appengine/docs/java/datastore/
- For Java-based SQL storage Apache Derby
Uilder code search
Information to set coding tool chain is found from vaadin book section Setting up the Development Environment.