You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Steve Gibson <St...@cowww.com> on 2004/05/26 16:19:29 UTC
Specifiying page validate listeners in the page specification
Hi,
I was just looking at the PageValidateListener interface and was
wondering whether it was possible or practical to be able to specify
listeners for a page event in the page specification. I know I could
probably do it by subclassing BasePage and adding the listener as a
property, but I was wondering if this was a useful thing to do as a core
part of Tapestry.
Specifically, if I had a SecurityManager class that implements
PageValidateListener, then for pages whose access needs to be
restricted, it could be as easy as adding an item to the page
specification. Of course, this would also be a lot nicer if the
SecurityManger was a HiveMind service, as the instance would be easier
to obtain.
Just a thought
Steve Gibson
Re: Specifiying page validate listeners in the page specification
Posted by Vjeran Marcinko <vj...@tis.hr>.
----- Original Message -----
From: "Howard M. Lewis Ship" <hl...@comcast.net>
To: "'Tapestry users'" <ta...@jakarta.apache.org>
Sent: Wednesday, May 26, 2004 4:44 PM
Subject: RE: Specifiying page validate listeners in the page specification
> This is functionality that could be built into 3.1, why don't you
prototype it for your own purposes
> in 3.0?
:-)))
Every 10th post contains something like - this could/should be added to 3.1
version... This Tapestry 3.1 will be real major breakthrough when finished.
-Vjeran
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: Specifiying page validate listeners in the page specification
Posted by "Howard M. Lewis Ship" <hl...@comcast.net>.
How about this:
Define your listeners are beans.
Create a base class for your pages that implements finishLoad().
The finishLoad() method will get a property from the page specification that is a list of beans. It
will get each bean, cast it to the right class, and add it as the right type of listener.
This is functionality that could be built into 3.1, why don't you prototype it for your own purposes
in 3.0?
--
Howard M. Lewis Ship
Independent J2EE / Open-Source Java Consultant
Creator, Jakarta Tapestry
Creator, Jakarta HiveMind
http://howardlewisship.com
> -----Original Message-----
> From: Steve Gibson [mailto:Steve.Gibson@cowww.com]
> Sent: Wednesday, May 26, 2004 10:19 AM
> To: Tapestry users
> Subject: Specifiying page validate listeners in the page specification
>
>
> Hi,
>
> I was just looking at the PageValidateListener interface and was
> wondering whether it was possible or practical to be able to specify
> listeners for a page event in the page specification. I know I could
> probably do it by subclassing BasePage and adding the listener as a
> property, but I was wondering if this was a useful thing to
> do as a core
> part of Tapestry.
>
> Specifically, if I had a SecurityManager class that implements
> PageValidateListener, then for pages whose access needs to be
> restricted, it could be as easy as adding an item to the page
> specification. Of course, this would also be a lot nicer if the
> SecurityManger was a HiveMind service, as the instance would be easier
> to obtain.
>
> Just a thought
>
> Steve Gibson
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org