I have created a behavior (WIP), which takes care of that:
http://svn2.assembla.com/svn/planningpoker/trunk/planningpoker-wicket/src/main/java/org/planningpoker/wicket/behaviours/ClickConfirmBehavior.java
Frank
On Tue, Jun 3, 2008 at 11:01 AM, Eyal Golan <[EMAIL PROTECTED]> 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
>
> --
> Eyal Golan
> [EMAIL PROTECTED]
>
> Visit: http://jvdrums.sourceforge.net/
> LinkedIn: http://www.linkedin.com/in/egolan74
>