Hi all,

how can I change the code so that the confirm-dialog is called when the 
#onClick method is executed and not at constructor-time?
I would like to change the dialog text based on some runtime variable.

Thanks, Chris



 Link link = new AjaxFallbackLink("link") {

            @Override
            public void onClick(AjaxRequestTarget target) {
                setResponsePage(new Page());
            }

            @Override
            protected void updateAjaxAttributes(AjaxRequestAttributes 
attributes) {
                super.updateAjaxAttributes(attributes);
                                AjaxCallListener ajaxCallListener = new 
AjaxCallListener();
                    ajaxCallListener.onPrecondition("return confirm('...');");
                    attributes.getAjaxCallListeners().add(ajaxCallListener);
                }
            }
        };
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to