hmm, just add it to the ajaxrequesttarget instead...

target.prependJavascript(javascript) ? Not sure if this does the trick though.

Eyal Golan wrote:
Hello all,
We have a StyledAjaxButton that extends AjaxButton.
We want to add a confirmation when clicking.

We added this:
                @Override
                protected String getOnClickScript() {
                    String warning =
LocalizationHelper.getMessage("page.confirmation.message", DELETE_TICKETS);
                    return "if (!window.confirm('"+warning+"')) return
false;";
                }

Now, in a normal Button it works.
But in the AjaxButton it does not.
I checked the AjaxButton and saw that an AjaxFormSubmitBehavior is added to
it with an onClick.
How can I add another behavior like this?
Or how can I tackle this problem?

Thanks


--
-Wicket for love

Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684


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

Reply via email to