Thiago,
Actually, an error page is not what I want. I want to implement
a message center (I call it switchboard) that distributes events
and takes care of cross-component zone updates.
I have a test version up in a project and I wonder why Tapestry
does not support this kind of loose event handling where
components register themselves for zone refreshes or method calls
that are related to events. I find that essential to implement
i.e. a global refresh zone strategy where a login component
triggers a 'logged in' event and where other components subscribe
to such an event because they have a zone that needs to refresh
to display a different price. It would also provide a much looser
connection between two less related components.
I need to polish this a bit and are willing to commit this to the
community as plug-in to tapestry because I find it very generic
and essential. It's a natural extension to event-bubbling that
otherwise only provides a one-way (up in this case) communication.
/Andreas Pardeike
On 28 sep 2009, at 16.27, Thiago H. de Paula Figueiredo wrote:
Em Mon, 28 Sep 2009 10:41:35 -0300, Cordenier Christophe <christophe.corden...@atosorigin.com
> escreveu:
Hi
Hi!
Take a look ComponentEventRequestHandlerImpl, following code are
calling the event on requested Component and Event :
boolean handled = element.triggerContextEvent
(parameters.getEventType(), parameters.getEventContext(),
callback);
if (!handled)
throw new TapestryException(ServicesMessages.eventNotHandled
(element, parameters.getEventType()), element, null);
You can catch these exceptions in an error page. Its name is defined
by the tapestry.exception-report-page configuration symbol. Make
sure your page implements ExceptionReporter, so it can receive the
raised exception.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org