Hi Andreas, With Katia (co-author) we are planning to upgrade this little Tapestry demo to 5.2 version soon and add some enhanced components. Thank you for your advices.
Regards, Laurent Guerin -------- Message d'origine-------- De: Andreas Andreou [mailto:andre...@gmail.com] Date: sam. 07/08/2010 04:26 À: Tapestry users Objet : Upgrading from 5.1 to 5.2 So, i picked a random 5.1 project from github ( http://github.com/lguerin/tapestwitter ) forked it, upgraded it to 5.2 and fixed all deprecation warnings... take a look /comment at the change logs at [1] and [2] I've found 2 small things worth noticing: 1) the project was building a JSONObject and outputting it INSIDE a js string - because by default the json is now pretty-printed, the newlines where causing js errors. The fix was to use json.toString(true) 2) The old renderSupport.addInit could accept a JSONArray and map the elements to the function's arguments Now you should build a JSONObject which will become the only argument of the function and use javaScriptSupport... Of course that's already documented and explained at [3] but i'm thinking the old way will appear more straightforward to some (i did spend some minutes trying to find how to send that second parameter before understanding that i should just bundle it along with the first inside a json) [1] http://github.com/andyhot/tapestwitter/commit/2dd797629cd0506a9fc5625e71100170c0cde300 [2] http://github.com/andyhot/tapestwitter/commit/b815eb395d9e820833ebf875a310b6d440f65f46 [3] http://tapestry.apache.org/tapestry5.2-dev/apidocs/org/apache/tapestry5/RenderSupport.html#addInit%28java.lang.String,%20org.apache.tapestry5.json.JSONArray%29 -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry PMC / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org