Hi @all, i was suprised that t5 does not support reverse ajax ;-(
googleing around, the only thing mentioned often enough is dwr and i ended here: http://apache-tapestry-mailing-list-archives.1045711.n5.nabble.com/Implement-chat-function-td5606481.html Actually, i want to do the same thing as the threadstarter: A loggedin user can start a one-to-one chat with an admin. The admin can handle multiple chats at the same time... I don't really know if dwr is what i really want and if dwr is the best thing recommended? Or are better solutions out there? So i've tried to integrate the Java Chat with the latest dwr-RC3 from dwr first, but only with partial success. My implementation does not have the same behaviour like the demo: http://directwebremoting.org/dwr-demo/reverseajax/java-chat.html I've put the HTML source (i had to replace the div with an ul) and the Javascript source into a .tml and the Java source into a corresponding java class into my t5 jumpstart project. GOOD: i can see the clients polling: ... [INFO] log.accessLog Incoming request: /dwr/call/plainpoll/ReverseAjax.dwr [INFO] log.accessLog Incoming request: /dwr/call/plainpoll/ReverseAjax.dwr [INFO] log.accessLog Incoming request: /dwr/call/plainpoll/ReverseAjax.dwr [INFO] log.accessLog Incoming request: /dwr/call/plainpoll/ReverseAjax.dwr ... GOOD: the addMessage() Method is called when the button is pressed ok, this is default behaviour GOOD: with opera i first get the expected behaviour: open page in opera and firefox, type "opera1" in opera and the message will be displayed in firefox and opera correctly. NOT GOOD: Then i type an "opera2" in opera and in opera i see the correct output: <ul id="chatlog"> <li>opera2</li> <li>opera1</li> </ul> But in firefox, the first message did not disapear, i get: <ul id="chatlog"> <li>opera1</li> <li>opera2</li> <li>opera1</li> </ul> BAD: now i type "firefox" in firefox and i get in opera: <ul id="chatlog"> <li>opera2</li> <li>opera1</li> <li>firefox</li> <li>opera2</li> <li>opera1</li> </ul> In the firefox browser nothing happens... the textfield is not reset and i still have: <li>opera1</li> <li>opera2</li> <li>opera1</li> BAD: when i now type an "opera3" in opera, i get in opera: <ul id="chatlog"> <li>opera3</li> <li>firefox</li> <li>opera2</li> <li>opera1</li> </ul> initially what i did really expected, but before was the wrong output, which is now replaced with the correct output :-) In firefox still everythig is wrong: <ul id="chatlog"> <li>opera1</li> <li>opera2</li> <li>opera1</li> <li>opera3</li> <li>firefox</li> <li>opera2</li> <li>opera1</li> </ul> VERY BAD: i get a lot of: 2013-05-22 22:28:47.976:WARN::header full: java.lang.NullPointerException and: 2013-05-22 22:28:47.976:WARN::header full: java.lang.IllegalStateException: last? and i don't know anything about these message, from where they come and what they mean and how i can trace them Also with chrome i am facing similar issues to firefox. I know the most questions will come, when i want to access tapestryservices later, but when i get these strange behaviour i don't know if dwr is the right thing when i don't get this simple example running. The thing is that i don't really know what the clients are calling. They call the dwr-servlet via the generated .js: "return dwr.engine._execute(p._path, 'MyChat', 'addMessage', arguments);" but how does dwr response? In the end i must access a t5 service, so the response must be filled with data from the t5 service... At this point i can not imagine how i can encapsulate dwr with t5 and let dwr interact with t5. Informations and examples are more than rare :-( A reverse ajax chat-webapp is not the most extreme case i can imagine :-) Anybody out there with some suggestions? Kind regards David --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org