I do it like this:
AjaxLink popupLink = new AjaxLink("manageWeightPop") {
@Override
public void onClick(AjaxRequestTarget target) {
modalWindow.setContent(new ManageWeightPanel(modalWindow
.getContentId(), modalWindow,
new BaseEntityDetachableModel(getPerson())));
modalWindow.show(target);
}
};
Which means I've made my panel aware of the fact that it lives in a
modal window...
regards Nino
Milan Kr(ápek wrote:
Hi,
please how can I pass the model to the modal window. I have my form in modal window and I want to show there some default vaules that can be changed. But I am not able to pass the model to the window. In constructor there is not any parameter for model. I try to do this:
MyWindow.setModel(new Model(myObject));
and in the modal window I try to acces myModel with standatd procedure:
myObject) = ((MyObject)) getModel().getObject());
but this throws me NullPointerException. But I do not know why. When I set the
model I am sure that it has some value.
Thanks for any advice
Milan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
-Wicket for love
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]