Re: DropDownChoice with Confirm Dialog

2013-07-24 Thread Martin Grigorov
Hi, On Wed, Jul 24, 2013 at 11:54 AM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Hi all, I like implement a DropDownChoice with an Confirm Dialog. I used an AjaxFormComponentUpdatingBehavior(on change) to intercept the change in the DropDownChoice. In addition, the

Re: DropDownChoice with Confirm Dialog

2013-07-24 Thread Marco Di Sabatino Di Diodoro
Hi Martin, attrs.event.preventDefault() not work. My DropDownChoice changes always. M Il giorno 24/lug/2013, alle ore 10:59, Martin Grigorov mgrigo...@apache.org ha scritto: Hi, On Wed, Jul 24, 2013 at 11:54 AM, Marco Di Sabatino Di Diodoro marco.disabat...@tirasa.net wrote: Hi

Re: DropDownChoice with Confirm Dialog

2013-07-24 Thread Martin Grigorov
This is purely JS problem. I don't find anything in the web that can do this automatically for you. Here is a possible solution: store the previous selected value in a custom attribute, e.g. data-prev-index=... then in the precondition code replace attrs.event.preventDefault() with : var $select =