use an IAjaxCallDecorator

        dataContainer.add(new AjaxButton("removeSelectedValues") {

            @Override
            protected IAjaxCallDecorator getAjaxCallDecorator() {
                return new 
AjaxPreprocessingCallDecorator(super.getAjaxCallDecorator()) {
                    private static final long serialVersionUID = 1L;

                    @Override
                    public CharSequence preDecorateScript(CharSequence script) {
                        return "if(!confirm('Are you sure you want to delete 
the selected values? \\n\\nNOTE: This localized identifier will be deleted in 
ALL application bundles and there is NO UNDO')) return false;" + script;
                    }
                };
            }


On Jan 28, 2010, at 11:00 AM, Josh Kamau wrote:

> Hi Team
> 
> lnkDelete.add(new SimpleAttributeModifier("onClick","return confirm('Are you
> sure you want to Delete?')" ));
> 
>      The above code produces a confirmation message if its a Link and
> doesnt work if its an AjaxFallbackLink. How do i make it work on ajax link
> 
> regards.
> 
> Josh


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | [email protected]
2321 E 4th St. Ste C-128, Santa Ana CA 92705
ofc: 714-816-4488
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: http://www.twitter.com/kinabalu

Eco-Tip: Printing e-mails is usually a waste.

========================================================
This message is for the named person's use only. You must not, directly or 
indirectly, use,
 disclose, distribute, print, or copy any part of this message if you are not 
the intended recipient.
========================================================

Reply via email to