You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Will Jaynes <wj...@gmail.com> on 2009/02/27 14:15:03 UTC

getting the component to which a Behavior is added from with the Behavior

I'm trying to write a class that extends OnChangeAjaxBehavior.  Is there a
way, in the update method, to get the component to which the behavior has
been added? I just don't see how. Should it just be added via the
constructor?

component.add(new MyOnChangeAjaxBehavior(component));

This doesn't seem right to me, but maybe that's the way?

Thanks for any info, Will

Re: getting the component to which a Behavior is added from with the Behavior

Posted by Will Jaynes <wi...@jaynes.org>.
<sigh> I think I'll go bury myself in shame. Thank you, Witold.

On Fri, Feb 27, 2009 at 8:24 AM, Witold Czaplewski
<wi...@cts-media.eu> wrote:

> I think you mean
> org.​apache.​wicket.​behavior.​AbstractAjaxBehavior#getComponent()
>
> Witold
>
> Am Fri, 27 Feb 2009 08:15:03 -0500
> schrieb Will Jaynes <wj...@gmail.com>:
>
> > I'm trying to write a class that extends OnChangeAjaxBehavior.  Is there
> a
> > way, in the update method, to get the component to which the behavior has
> > been added? I just don't see how. Should it just be added via the
> > constructor?
> >
> > component.add(new MyOnChangeAjaxBehavior(component));
> >
> > This doesn't seem right to me, but maybe that's the way?
> >
> > Thanks for any info, Will
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
>
>

Re: getting the component to which a Behavior is added from with the Behavior

Posted by Witold Czaplewski <wi...@cts-media.eu>.
I think you mean
org.​apache.​wicket.​behavior.​AbstractAjaxBehavior#getComponent()

Witold

Am Fri, 27 Feb 2009 08:15:03 -0500
schrieb Will Jaynes <wj...@gmail.com>:

> I'm trying to write a class that extends OnChangeAjaxBehavior.  Is there a
> way, in the update method, to get the component to which the behavior has
> been added? I just don't see how. Should it just be added via the
> constructor?
> 
> component.add(new MyOnChangeAjaxBehavior(component));
> 
> This doesn't seem right to me, but maybe that's the way?
> 
> Thanks for any info, Will

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org