Re: simple confirmation on button/link

2014-10-31 Thread Andrea Del Bene
Probably there was a misunderstanding :). I saw Garret Wilson searching for a behavior to inject "submission" and "confirmation" into various components. I just pointed out that actually we have a special behavior for AJAX (AbstractDefaultAjaxBehavior) that can be used to factorize custom Ajax

Re: simple confirmation on button/link

2014-10-31 Thread Martin Grigorov
Unless you use a more powerful language than Java that provides something like Scala's Trait I don't see how you could implement your solution without re-implementing the standard Ajax links. Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 31, 2014 at 5:3

Re: simple confirmation on button/link

2014-10-31 Thread Andrea Del Bene
You are suggesting something like we see in GlobalUpdateAjaxAttributesTest, right? What I was thinking of was a less powerful solution suited to decorate standard AJAX links only in few cases you might need confirmation. You have to refresh your knowledge about the related code. Or I should ..

Re: simple confirmation on button/link

2014-10-31 Thread Martin Grigorov
You have to refresh your knowledge about the related code. Or I should ... Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 31, 2014 at 3:54 PM, Andrea Del Bene wrote: > You have to add it explicitly with the usual way. This is more desirable > if you d

Re: simple confirmation on button/link

2014-10-31 Thread Andrea Del Bene
You have to add it explicitly with the usual way. This is more desirable if you don't want to apply it to every Ajax behavior as you suggested. @Andrea: how would you share this behavior between ConfirmingAjaxLink and ConfirmingAjaxSubmitLink ? Martin Grigorov Wicket Training and Consulting http

Re: simple confirmation on button/link

2014-10-31 Thread Martin Grigorov
@Andrea: how would you share this behavior between ConfirmingAjaxLink and ConfirmingAjaxSubmitLink ? Martin Grigorov Wicket Training and Consulting https://twitter.com/mtgrigorov On Fri, Oct 31, 2014 at 2:56 PM, Andrea Del Bene wrote: > you can also use behavior AbstractDefaultAjaxBehavior whic

Re: simple confirmation on button/link

2014-10-31 Thread Andrea Del Bene
you can also use behavior AbstractDefaultAjaxBehavior which has updateAjaxAttributes(AjaxRequestAttributes attributes), so you can share confirmation code among different components. Hi, On Thu, Oct 30, 2014 at 11:57 PM, Garret Wilson wrote: Andrea, thanks for jolting my brain; I was a littl

Re: simple confirmation on button/link

2014-10-31 Thread Martin Grigorov
Hi, On Thu, Oct 30, 2014 at 11:57 PM, Garret Wilson wrote: > Andrea, thanks for jolting my brain; I was a little sleepy this morning. > > I was using a subclass of AjaxLink that added confirmation JavaScript as I > outlined below. My original HTML was: > > > > The root of the problem is tha

Re: simple confirmation on button/link

2014-10-30 Thread Garret Wilson
Andrea, thanks for jolting my brain; I was a little sleepy this morning. I was using a subclass of AjaxLink that added confirmation JavaScript as I outlined below. My original HTML was: The root of the problem is that Wicket kept turning that into: Thus even though I got a confirm

Re: simple confirmation on button/link

2014-10-30 Thread Andrea Del Bene
On 30/10/14 17:57, Garret Wilson wrote: All, I've created a simple confirmation link based on Sven Meier's ConfirmationLink code on Confluence. For the most part it works, but... ...but if I'm on an upload form, then an an Ajax link won't work bec

simple confirmation on button/link

2014-10-30 Thread Garret Wilson
All, I've created a simple confirmation link based on Sven Meier's ConfirmationLink code on Confluence. For the most part it works, but... ...but if I'm on an upload form, then an an Ajax link won't work because I need to actually submit the multip