On Jan 30, 2008 11:50 PM, i ii <[EMAIL PROTECTED]> wrote:

>
> thank you for your fast reply. from what you said i found
>
> link.add(new AttributeAppender("onmouseover", new Model("foo();return
> false;"), ";"));
>
> what benefit is to use AttributeAppender versus onComponentTag? why two
> ways?
>


because sometimes onComponentTag is final ;)

there are lots of situations where using an AttributeAppender is just
shorter (codewise).
so instead of creating an anonymous inner class and overriding
onComponentTag,
you can just add an AttributeAppender -> one-liner

notice, AttributeAppender is a bit "heavier" than overriding onComponentTag
for obvious reasons.

  gerolf

>
> ----------------------------------------
> > Date: Wed, 30 Jan 2008 23:44:54 +0100
> > From: [EMAIL PROTECTED]
> > To: users@wicket.apache.org
> > Subject: Re: How can I use onComponentTag for a PasswordTextField?
> >
> > you could use an AttributeModifier/AttributeAppender
> >
> >   gerolf
> >
> > On Jan 30, 2008 11:42 PM, i ii  wrote:
> >
> >>
> >> how can i use onComponentTag for a PasswordTextField? method is final?
> >>
> >> i need to add dynamic javascript to onfocus
> >> ---------------------------------------------------------------------
> >> 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