We have an AjaxButton with the following flag, to disable default form
processing (we don't want it to submit the form):

ajaxButton.setDefaultFormProcessing(false);

The problem is that we need to attach a JS alert box ("Are you sure?
OK/Cancel") when this button is clicked. If OK is clicked, we go through
with the onSubmit(), otherwise nothing happens.

I'm seeing that when I do this

ajaxButton.add( new SimpleAttributeModifier("onclick", "return confirm('Are
you sure you want to delete the selected record(s)?');"));

nothing happens regardless of OK/Cancel, the onSubmit is never invoked. Is
that because defaultFormProcessing=False? Is there a workaround? Thanks



--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/How-to-Add-JS-Modifer-to-a-Non-Form-Processing-AjaxButton-tp4657904.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]

Reply via email to