I often pass the 'real' or 'domain' model object that a form is editing
as a parameter to the form/modal constructor and then store a IModel
wicket model wrapper object around that model object in the form/modal.

>-----Original Message-----
>From: Anna Simbirtsev [mailto:asimbirt...@gmail.com]
>Sent: Saturday, 3 September 2011 1:08 AM
>To: users@wicket.apache.org
>Subject: Passing info to the modal window
>
>Hi, I have a modal window defined like in the following example:
>
>
>*public class *Modal *extends *WebPage
>{
>  *public *Modal()
>  {
> *final *ModalWindow modal1;
>  add(modal1 = *new *ModalWindow("modal1"));
>
>  modal1.setPageMapName("modal-1");
>  modal1.setCookieName("modal-1");
>  modal1.setPageCreator(*new *ModalWindow.PageCreator()
>  {
>  *public *Page createPage()
>  {
>  *return new *ModalPage1(Modal.this, modal1);
>  }
>  });
>
>  add(*new *AjaxLink("showModal1")
>  {
>  *public **void *onClick(AjaxRequestTarget target)
>  {
>  modal1.show(target);
>  }
>  });
>
>}
>
>*public class *ModalPage1 *extends *WebPage{
>  *public *ModalPage1(Modal modal,ModalWindow modalwindow){
>
>     public void setData(String data) {
>
>     }
>  }
>}
>
>My question is how can I call the function setData, if I have the
modal1.
>
>Thanks
>Anna

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

Reply via email to