Hey Sekib,

Thanks a lot for your input!

In case anybody has a similar problem, I ended up solving it through an
AjaxCallListener with a little workaround. If the user confirms the alert,
I re-trigger a click on the link with additional data and check for that in
my precondition. This can be used to perform arbitrary async actions in a
listener precondition.

@Override
> public CharSequence getPrecondition(final Component component) {
>
            return "if (attrs.event.extraData != 'OK')  { jConfirm(function(r)
> { if (r) { $('#" + component.getMarkupId() + "').trigger('click', 'OK'); }
> }); return false;";

}


Cheers,

Thomas

On Mon, Nov 5, 2012 at 2:35 PM, Sekib_Omazic <sekib1...@gmail.com> wrote:

> If this is an option for you, you could use modal dialog from twitter
> bootstrap (short example can be fond here:
> https://github.com/sekib/twittermodal). I don't use public CharSequence
> getPrecondition(final Component component) at all. Modal dialog is shown
> after clicking the link (no ajax call). Only a click on "Of course" button
> triggers an ajax call.
>
>
>
> --
> View this message in context:
> http://apache-wicket.1842946.n4.nabble.com/AjaxCallListener-precondition-with-user-input-tp4653566p4653622.html
> Sent from the Users forum mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
> For additional commands, e-mail: users-h...@wicket.apache.org
>
>

Reply via email to