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: notify embedded components

2013-03-24 Thread Paul Stanton
Should I jira? On 23/03/2013 3:36 AM, Howard Lewis Ship wrote: ive tought this woud be a cool feature, but it does not exist yet. On Thursday, March 21, 2013, Paul Stanton wrote: Hi all, Is there a way to trigger an event in a container (Page) which notifies embedded components? I'm hoping

Re: notify embedded components

2013-03-22 Thread Lenny Primak
The CDI has support for events in an elegant way: http://docs.oracle.com/javaee/6/tutorial/doc/gkhic.html FlowLogix library supports CDI as well On Mar 22, 2013, at 11:36 AM, Howard Lewis Ship wrote: > ive tought this woud be a cool feature, but it does not exist yet. > > On Thursday, March 2

Re: notify embedded components

2013-03-22 Thread Howard Lewis Ship
ive tought this woud be a cool feature, but it does not exist yet. On Thursday, March 21, 2013, Paul Stanton wrote: > Hi all, > > Is there a way to trigger an event in a container (Page) which notifies > embedded components? > > I'm hoping to do something like this (pseudo code) : > > Page > { >

notify embedded components

2013-03-21 Thread Paul Stanton
Hi all, Is there a way to trigger an event in a container (Page) which notifies embedded components? I'm hoping to do something like this (pseudo code) : Page { void onSomeEvent() { notifyListeners("SomethingHappened"); } } EmbeddedComponent { void setupRender() {