You could easily use a WebMarkupContainer for that overriding the
oncomponenttag, or  with a SimpleAttributeModifier to add the
javascript.

Martijn

On 9/29/07, David Bernard <[EMAIL PROTECTED]> wrote:
> FYI, currently I use it to call pure (no server side) javascript function 
> (like hide/show, diseable/enable drag'n drop,...).
> ex :
> add(new Link("stop_dnd") {
>              @Override
>              protected CharSequence getOnClickScript(CharSequence url) {
>                  return dnd.getJSFunctionName4Stop() + "();";
>              }
>
>              @Override
>              protected CharSequence getURL() {
>                  return "#";
>              }
>
>              @Override
>              public void onClick() {
>                  throw new UnsupportedOperationException("NOT CALLABLE");
>              }
>
>          });
>
> The name of the function to call is generated by the server when the page is 
> rendered.
>
> /david
>
> Martijn Dashorst wrote:
> > With the advent of behaviors, is Link's getOnClickScript method still
> > necessary or a relic of the past that should be deprecated and removed
> > in a future version?
> >
> > Martijn
> >
>


-- 
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-beta3 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-beta3/

Reply via email to