Re: notify embedded components

2014-06-19 Thread Dmitry Gusev
You better trust it if it works :) There's 3rd-party Publisher API that does similar thing: https://github.com/anjlab/anjlab-tapestry-commons/wiki/Publisher-API Look at the source code to see implementation details. Publisher and subscriber doesn't have to be nested there, they can be in differe

Re: notify embedded components

2014-06-19 Thread Geoff Callender
Very cute. It's something akin to GWT's event buses, but server-side. A less cute alternative, but one which and has served my needs to date and is straight-forward, is to have the container call a method on each interested component. You can see it in the following example. Page Persons has sev

Re: notify embedded components

2014-06-19 Thread Paul Stanton
This seems to work, but i'm not sure i trust it! anyone have a better idea? It would be great to be able to subscribe to an event thrown by the container... MyPage { @Persist Private List listeners; void setupRender(){ listeners = new ArrayList<>(); } public v

RE: Redirecting to a page from a MethodAdvice implementation

2014-06-19 Thread Lance Java
You could get rid of the unnecessary interface using @InjectService or a marker annotation eg: binder.bind(MethodAdvice.class, ExceptionDisplayMethodAdviceImpl.class).withId("foo"); ... @InjectService("foo") private MethodAdvice advice; More info here: http://tapestry.apache.org/defining-tapestr

RE: Redirecting to a page from a MethodAdvice implementation

2014-06-19 Thread Davide Vecchi
I'm not sure if the following is what the hints above meant, however it works, in case it can be useful to others. Thanks for the help. - package myproject.tapestry.services; import org.apache.tapestry5.plastic.MethodAdvice; public interface ExceptionDisplayMethodAdv

Re: WebSocket for tapestry

2014-06-19 Thread Lance Java
Ok, thanks for reporting, I've raised an issue here https://github.com/uklance/tapestry-atmosphere/issues/22