I've implemented this feature in tapestry-cometd but it's not been implemented in tapestry-atmosphere yet. I think it's only a couple of lines of javascript.
I have just updated the outstanding issue with a possible solution here: https://github.com/uklance/tapestry-atmosphere/issues/5 Pull requests welcomed!! On 21 May 2014 04:21, "Bogdan Ivascu" <ivascu.bogdan...@gmail.com> wrote: > I ended up using your atmosphere implementation and it works like a charm, > so many thanks for that. I have an additional questions though. When > returning the block to the client, basically your ChatDemo class > ( > > https://github.com/uklance/tapestry-atmosphere/blob/master/tapestry-atmosphere-demo/src/main/java/org/lazan/t5/atmosphere/demo/pages/ChatDemo.java#L65 > ) > ->onChatMessage method, I want to be able to execute some client > javascript > that will parse a Long number and make it into a date using momentjs. Where > can I patch in this piece of code? I tried changing the return type of the > method to void and using AjaxRespRenderer to display the block and then > call the javascript without much success. What would be a good solution > here, listen on the client side for some event to be triggered or somehow > make an ajax addScript() call from the server. > > Thanks, > Bogdan. > > > On Tue, May 13, 2014 at 12:15 PM, Bogdan Ivascu > <ivascu.bogdan...@gmail.com>wrote: > > > Hi Lance, > > I did see numerous discussions around your implementation. My goal here > > is to try and get a better understanding of where and how this framework > > can be extended. I am however pressed for time and if I cannot get it to > > work, I will most likely end up using your implementation. > > > > Thanks, > > Bogdan. > > > > > > On Tue, May 13, 2014 at 3:34 AM, Lance Java <lance.j...@googlemail.com > >wrote: > > > >> Take a look at tapestry-atmosphere [1] and tapestry-cometd [2] > >> > >> [1] https://github.com/uklance/tapestry-atmosphere > >> [2] https://github.com/uklance/tapestry-cometd > >> On 13 May 2014 02:10, "Bogdan Ivascu" <ivascu.bogdan...@gmail.com> > wrote: > >> > >> > Hi everyone, > >> > I want to add webSocket support for my tapestry project and need a > few > >> > pointers. What I have is a dead simple Servlet, implementing the java > >> > WebSocket api. I would like to bring this servlet into my tapestry > >> project > >> > and have it managed by tapestry itself. To be more clear, I don't want > >> to > >> > use the ignore path functionality to expose it, but rather have > >> tapestry's > >> > filter control the access to this servlet. > >> > > >> > The biggest problem that I have right now is that I don't have a clear > >> > understanding of what I need to do to make this happen. Will this > >> servlet > >> > be a service or a page with no tml, where would it sit, how do I > >> configure > >> > tapestry so that it knows to create a new instance for each request. > >> > > >> > A nudge of where I could document myself regarding this type of > >> integration > >> > would be most welcome. > >> > > >> > Thank you, > >> > Bogdan. > >> > > >> > > > > >