Ah, the elegant solution I was looking for.  Thanks for your help.

On 11/11/05, Patrick Casey <[EMAIL PROTECTED]> wrote:
>
>         Set up a parameter of type IActionListener and then pass your page's
> listener method into the component.
>
>         --- Pat
>
> > -----Original Message-----
> > From: an [mailto:[EMAIL PROTECTED]
> > Sent: Friday, November 11, 2005 3:16 PM
> > To: [email protected]
> > Subject: Component calling the listeners of its containing page
> >
> > Hi all,
> >
> > Let's say I have a "Next" button that takes the user to the next page,
> > after performing some computations.  These computations are dependent
> > on the particular page the user is on.
> >
> > I have implemented the "Next" button as a component, but I am not sure
> > how to make it call the appropriate listeners of the page it's
> > embedded in.
> >
> > The hacky way would be to have a DirectLink on the component that
> > calls one of the component's listeners, which in turn calls
> > getPage().mainListenerFunction(), after performing the appropriate
> > cast.  However, I don't really want to do this.
> >
> > Is there a less hacky way of doing it?  Would it be a good idea to
> > have the page somehow pass a listener to the component, and have the
> > component call that listener?  Or is there a better design?
> >
> > Thanks!
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to