You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by mshaver <ma...@gmail.com> on 2011/11/17 19:46:34 UTC

Trying to use IAjaxCallDecorator after Modal Window close

Hi all - I'm trying to add a "busy" indicator after a modal window is closed.
In my use case, the WindowClosedCallback's onClose method is performing a
few operations, and I just want to let the user know that the system is
actually doing something.

I noticed that CloseButtonBehavior has a getAjaxCallDecorator method, but in
this case my Modal Window is being closed by
ModalWindow.closeCurrent(target).

I'm currently using Wicket 1.4.18, but should be upgrading to 1.5.3
relatively soon.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Trying-to-use-IAjaxCallDecorator-after-Modal-Window-close-tp4081142p4081142.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Trying to use IAjaxCallDecorator after Modal Window close

Posted by mshaver <ma...@gmail.com>.
I defined my own ModalWindow subclass that overrode "show" like so:

    @Override
    public void show(final AjaxRequestTarget target)
    {
        super.show(target);
        target.appendJavascript("Mask.show('" +  SOME_ARBITRARY_MASK_KEY  +
"')");
    }

Then I defined an implementation of WindowClosedCallback with the following:

    @Override
    public void onClose(final AjaxRequestTarget target)
    {
        target.appendJavascript("Mask.hide('" +
MyModalWindowSubClass.SOME_ARBITRARY_MASK_KEY  + "')");
        onCloseAction(target);
    }

    public abstract void onCloseAction(AjaxRequestTarget target);

So every time you show one of these custom modal windows, you have to use
this implementation of WindowClosedCallback or hide the mask manually.

Again, not ideal - but it works!

On Thu, Apr 26, 2012 at 4:32 AM, quando [via Apache Wicket] <
ml-node+s1842946n4589548h77@n4.nabble.com> wrote:

> Hello,
>
> how do you solved the problem exactly?
>
> kind regards
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://apache-wicket.1842946.n4.nabble.com/Trying-to-use-IAjaxCallDecorator-after-Modal-Window-close-tp4081142p4589548.html
>  To unsubscribe from Trying to use IAjaxCallDecorator after Modal Window
> close, click here<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4081142&code=bWFzaGF2ZXJAZ21haWwuY29tfDQwODExNDJ8LTE4NDQ3NzI0ODA=>
> .
> NAML<http://apache-wicket.1842946.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>


--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Trying-to-use-IAjaxCallDecorator-after-Modal-Window-close-tp4081142p4593532.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Trying to use IAjaxCallDecorator after Modal Window close

Posted by quando <ko...@freenet.de>.
Hello,

how do you solved the problem exactly?

kind regards

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Trying-to-use-IAjaxCallDecorator-after-Modal-Window-close-tp4081142p4589548.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: Trying to use IAjaxCallDecorator after Modal Window close

Posted by mshaver <ma...@gmail.com>.
Found a work-around for this... before showing the modal, I manually call the
javascript to show the mask, then hide it in the WindowClosedCallback.

Not ideal, but hey.

--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/Trying-to-use-IAjaxCallDecorator-after-Modal-Window-close-tp4081142p4244277.html
Sent from the Users forum mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org