Re: Modal closed callback

2015-08-28 Thread Marco Di Sabatino Di Diodoro

Hi Gabriel,

thanks for your help.

Regards
Marco

Il 27/08/2015 20:27, Gabriel Landon ha scritto:

You mean something like this :

public class PanelContentModal extends ModalVoid {
 /** close callback. */
 private WindowClosedCallback windowClosedCallback = null;


 public PanelContentModal(final String varMarkupId) {
 super(varMarkupId);
 setUseCloseHandler(true);
 }

 @Override
 protected void onClose(final AjaxRequestTarget paramTarget) {
 if (windowClosedCallback != null) {
 windowClosedCallback.onClose(paramTarget);
 }
 }

  public PanelContentModal setWindowClosedCallback(final
WindowClosedCallback callback) {
 windowClosedCallback = callback;
 return this;
 }
}

And then use it like a ModalWindow :

PanelContentModal  modal = new PanelContentModal(yourId);
modal.setWindowClosedCallback(new WindowClosedCallback() {
 @Override
 public void onClose(final AjaxRequestTarget paramTarget) {
 // Do your refresh
 }
});

regards,

Gabriel.
});

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-closed-callback-tp4671861p4671862.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



--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Modal closed callback

2015-08-27 Thread Marco Di Sabatino Di Diodoro

Hi,

I'm using de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal, 
how can I implement a Modal Closed Callback? I must refresh a ListView 
after submit from a Modal.


Thanks
Marco

--
Dott. Marco Di Sabatino Di Diodoro
Tel. +39 3939065570

Tirasa S.r.l.
Viale D'Annunzio 267 - 65127 Pescara
Tel +39 0859116307 / FAX +39 085973
http://www.tirasa.net

Apache Syncope PMC Member
http://people.apache.org/~mdisabatino/



Re: Modal closed callback

2015-08-27 Thread Gabriel Landon
You mean something like this :

public class PanelContentModal extends ModalVoid {
/** close callback. */
private WindowClosedCallback windowClosedCallback = null;


public PanelContentModal(final String varMarkupId) {
super(varMarkupId);
setUseCloseHandler(true);
}

@Override
protected void onClose(final AjaxRequestTarget paramTarget) {
if (windowClosedCallback != null) {
windowClosedCallback.onClose(paramTarget);
}
}

 public PanelContentModal setWindowClosedCallback(final
WindowClosedCallback callback) {
windowClosedCallback = callback;
return this;
}
} 

And then use it like a ModalWindow :

PanelContentModal  modal = new PanelContentModal(yourId);
modal.setWindowClosedCallback(new WindowClosedCallback() {
@Override
public void onClose(final AjaxRequestTarget paramTarget) {
// Do your refresh
}
});

regards,

Gabriel.
});

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Modal-closed-callback-tp4671861p4671862.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