You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by grazia <Gr...@gmail.com> on 2013/04/01 23:48:04 UTC
Re: ModalWindow: setWindowClosedCallback has access to old model or
change to modal window's model goes away ?
I think that the issue has something to do with the fact that
WindowClosedCallBack is a Behavior, and in the wicket.Behavior I find the
note:
* <p>
* You also cannot modify a components model with a behavior.
* </p>
I am not modifying the model of the window through the windowClosedCallBack,
but does this note also mean that I cannot expect the behavior to hold a
reference to an updated model of the component (my modal window) ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-setWindowClosedCallback-has-access-to-old-model-or-change-to-modal-window-s-model-goes-a-tp4657672p4657679.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: ModalWindow: setWindowClosedCallback has access to old model or
change to modal window's model goes away ?
Posted by grazia <Gr...@gmail.com>.
I have tried to detach the model of the modal window in the onclick, and to
reset it, but to no avail. I think that trying to manipulate teh model of
the modal window for my purpose will not work at all.
So, I have tried in the onClick to redirect to intercept page this way:
modalPageReference.getPage().redirectToInterceptPage(new
SecondPage(parameters));
window.close(target);
Then, I have modified the windowClosedCallBack this way:
window.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() {
private static final long serialVersionUID = 1L;
@Override
public void onClose(AjaxRequestTarget target) {
modalPageReference.getPage().continueToOriginalDestination();
}
});
The only problem is that he SecondPage is rendered within the modal window,
and I would like to close it and use the window of the main page ...
Anyone interested in helping out with this ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-setWindowClosedCallback-has-access-to-old-model-or-change-to-modal-window-s-model-goes-a-tp4657672p4657681.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: ModalWindow: setWindowClosedCallback has access to old model or
change to modal window's model goes away ?
Posted by grazia <Gr...@gmail.com>.
It seems that the model of the modal window is read before his behavior
responds, and it is not re-read after the behavior responds.
How to get around this ? Nobody has a suggestion ?
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/ModalWindow-setWindowClosedCallback-has-access-to-old-model-or-change-to-modal-window-s-model-goes-a-tp4657672p4657680.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