Note that there are some explanatory texts on larger screens.

plurals
  1. POjqwicket PrettyPopin Modal doesn't return for parent page after submit
    primarykey
    data
    text
    <p>In a wicket web page I'm using a ListView to display objects and in a each line of this component there is a link to open a PrettyPopin Modal Window to edit an object.</p> <p>The problem is that on submit event the Modal Window doesn't returns to parent or original page and its reloaded.</p> <p>First is showed the parent page code</p> <pre><code>class ObjListPanel(pageOrigin: PageBase/*WebPage*/) extends Panel("objListPanel") with Serializable { add(new ListView[Obj]("listObj", listData) { def populateItem(item: ListItem[Obj]) = { item.add(new LinkEdit("edit", obj)) } }) var editObjWinModal = new ModalWindow("modalEditObj") editObjWinModal.setPageMapName("modalEditObj") editObjWinModal.setWindowClosedCallback(new ModalWindow.WindowClosedCallback() { def onClose(target: AjaxRequestTarget) = setResponsePage(pageOrigin) }) add(editObjWinModal) private class LinkEdit(id: String, obj: Obj) extends Link[String](id) { add(new Label("label", new Model[String]() { override def getObject: String = "Edit" })) var prettyOpt = new PrettyPopinOptions() var pretty = new PrettyPopinBehavior(prettyOpt.width(550).height(200).followScroll(false)) add(pretty) def onClick() { new EditObjPanel(editObjWinModal.getContentId(), this.obj, pageOrigin); setResponsePage(new EditObjPage(this.obj, pageOrigin)) } } } </code></pre> <p>And bellow is the code of a child page, in truth a Panel</p> <pre><code>class EditObjPanel(id: String, obj: Obj, pageOrigin: PageBase/*WebPage*/) extends Panel(id) { var form = new Form[Obj]("form") { override protected def onSubmit = { objController.salvarObj(obj) // This method doesn't work // after submit the modal didn't close, instead is reloaded again setResponsePage(new EditPontoPage(obj, pageOrigin)) } } add(form); form.setOutputMarkupId(true) container = new WebMarkupContainer("container") form.add(container); } </code></pre> <p>I'm working on this code for a couple of hours and I didn't get what is wrong.</p> <p>Could someone help me with it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload