Hi, I am working with wicket and jpa/hibernate/spring. I am trying to create a ModalWindow, but I get a LazyLoadingException. I tryed the OSIVpattern, but it did not work. Using the modal inside a form does not make any difference also.
Has anyone else this problem? The page which the modalWindow is triggered has: =============== AjaxLink link = new AjaxLink("openModal") { @Override public void onClick(AjaxRequestTarget target) { modalWindow.setPageCreator(new ModalWindow.PageCreator() { public Page createPage() { return new MyModalPage(modalWindow, messageListModel.getObject().get(0)); } }); modalWindow.show(target); } }; ============== #Modal Panel ============== public class MyModalPage extends WebPage { @SpringBean GeneralRepository generalRepository; Set<SubMessage> selectedSubs = new HashSet<SubMessage>(); public MyModalPage(final ModalWindow window, Message message) { Message showMessage = (Message) generalRepository.<Message>getById(message.getId(), Message.class); //showMessage.getLazyList().size(); Form f = new Form("form"); add(f); CheckBoxMultipleChoice subMessagesCB = new CheckBoxMultipleChoice( "subMessages", new PropertyModel(this, "selectedSubs"), showMessage.getLazyList()); f.add(subMessagesCB); AjaxButton saveButton = new AjaxButton("save") { @Override protected void onSubmit(AjaxRequestTarget target, Form<?> arg1) { window.close(target); } }; f.add(saveButton); add(new AjaxLink("closeCancel") { @Override public void onClick(AjaxRequestTarget target) { window.close(target); } }); } ========== -- Albert --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org