Hi, See org.apache.wicket.markup.html.link.Link#onComponentTag(). You override the popup settings with your alert.
You may need to override org.apache.wicket.markup.html.link.Link#onComponentTag() to be able to preserve the popup settings. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Sep 4, 2015 at 10:42 AM, xesj <[email protected]> wrote: > Hi ! > > When a Link doesn't open popup window, I can write onclick in html code: > ... > > But 'popup' Link rewrites onclick attribute. > I tried to modify this javascript, but this example isn't working: > > add( > new Link("linkWithConfirm") { > @Override > public void onClick() { > setResponsePage(Abc.class); > } > @Override > protected CharSequence getOnClickScript(CharSequence url) { > return "alert('run!!!'); " + super.getOnClickScript(url); > } > } > .setPopupSettings(new PopupSettings()) > ); > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/How-can-I-modify-onclick-attribute-of-Link-wicket7-tp4671900.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
