Hi,

I've tried your code with Wicket 1.5.7 and it seems to work. What kind of error are you getting?
                add(new AjaxLink<File>("delete") {

                        @Override
                        public void onClick(AjaxRequestTarget target) {
                        }
                        
                        @Override
                        protected IAjaxCallDecorator getAjaxCallDecorator() {
                                return new ConfirmAjaxDecorator("Delete?");
                        }

                });

public class ConfirmAjaxDecorator extends AjaxCallDecorator {
        
     private String message;

     public ConfirmAjaxDecorator(String message) {
         this.message = message;
     }

     @Override
        public CharSequence decorateScript(Component c, CharSequence script) {
         return new
StringBuilder("if(!confirm('").append(message).append("')) { return false;
};").append(script);
     }

}

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/wicket-1-5-confirmation-ajaxbutton-tp4650460p4650462.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to