Re: DWR with T5
Where is the demoReply tag in your html ? Have you tried to launch the DWR test tool to check that it works before integrating it in your pages ? Stephane kace a écrit : > I ended up with the following in my page class to get the scripts added: > > void setupRender() { > > renderSupport.addScriptLink(request.getContextPath()+ > "/dwr/engine.js"); > renderSupport.addScriptLink(request.getContextPath()+ > "/dwr/util.js"); > renderSupport.addScriptLink(request.getContextPath()+ > "/dwr/interface/myPageName.js"); > } > > However, I am trying to do a test but I get no response > > > > Name: > > > Reply: > > > > > > function updates() { > var name = dwr.util.getValue("demoName"); > myPageName.sayHello(name, function(data) { > dwr.util.setValue("demoReply", data); > }); > } > > > > and I have this in the java class: > > public String sayHello(String name) { > System.out.println("Hello, " + name); > return "Hello, " + name; > } > > The simplest example but I cant get it to work. Using Tapestry 5.0.18 ; > DWR-3.0-RC1 > > I get the following error : Error: undefined, Error - Anyone who started > playing with this have this problem early on? > > Thanks > > .kace > >
Re: DWR with T5
I ended up with the following in my page class to get the scripts added: void setupRender() { renderSupport.addScriptLink(request.getContextPath()+ "/dwr/engine.js"); renderSupport.addScriptLink(request.getContextPath()+ "/dwr/util.js"); renderSupport.addScriptLink(request.getContextPath()+ "/dwr/interface/myPageName.js"); } However, I am trying to do a test but I get no response Name: Reply: function updates() { var name = dwr.util.getValue("demoName"); myPageName.sayHello(name, function(data) { dwr.util.setValue("demoReply", data); }); } and I have this in the java class: public String sayHello(String name) { System.out.println("Hello, " + name); return "Hello, " + name; } The simplest example but I cant get it to work. Using Tapestry 5.0.18 ; DWR-3.0-RC1 I get the following error : Error: undefined, Error - Anyone who started playing with this have this problem early on? Thanks .kace -- View this message in context: http://www.nabble.com/DWR-with-T5-tp22249541p22254869.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DWR with T5
Nope, that doesnt work :( it takes me to my page class and then starts to look for the js from that reference point ( I think) Caused by: java.lang.RuntimeException: Unable to locate asset 'context:dwr/engine.js' (the file does not exist). Thanks ..kace -- View this message in context: http://www.nabble.com/DWR-with-T5-tp22249541p22252067.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DWR with T5
Change that to @IncludeJavaScriptLibrariy("context:/dwr/engine.js") kace wrote: Looking to get the javascript files injected for dwr into my page but having difficulty with the @IncludeJavaScriptLibrary("/dwr/engine.js") Using that tells it to look for the js files where the page class is but I am needing it to look at http://myapp/dwr/engine.js Thanks, ..kace - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DWR with T5
Looking to get the javascript files injected for dwr into my page but having difficulty with the @IncludeJavaScriptLibrary("/dwr/engine.js") Using that tells it to look for the js files where the page class is but I am needing it to look at http://myapp/dwr/engine.js Thanks, ..kace -- View this message in context: http://www.nabble.com/DWR-with-T5-tp22249541p22251524.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DWR with T5
What would I have to do differently in order to use Spring as the glue? -- View this message in context: http://www.nabble.com/DWR-with-T5-tp22249541p22249913.html Sent from the Tapestry - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org
Re: DWR with T5
I've integrated DWR in my application and even in several libraries. The simplest way seems to use Spring as the glue ... So you can use Spring as the creator. Stephane kace a écrit : > Hi fellas, > > I am looking to integrate Tapestry 5 with DWR 3-RC1. > > Added the following to web.xml > > > dwr-invoker > > org.directwebremoting.servlet.DwrServlet > > activeReverseAjaxEnabled > true > > > debug > true > > > maxWaitAfterWrite > -1 > > 1 > > > > dwr-invoker > /dwr/* > > > added the following to the module class: > > public static void contributeIgnoredPathsFilter(Configuration > configuration) { > configuration.add("/dwr/.*"); > } > > Now, Im trying to run a simple test but not sure how to handle the dwr.xml, > specifically, what to use as creator? > > > > > > > > Has anyone got a working example with tapestry that can be looked at? > > Appreciate any help. > > Thanks > > ..kace > > > >