java - jqwicket PrettyPopin Modal doesn't return for parent page after submit -
in wicket web page i'm using listview display objects , in each line of component there link open prettypopin modal window edit object.
the problem on submit event modal window doesn't returns parent or original page , reloaded.
first showed parent page code
class objlistpanel(pageorigin: pagebase/*webpage*/) extends panel("objlistpanel") 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)) } } }
and bellow code of child page, in truth panel
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) // method doesn't work // after submit modal didn't close, instead reloaded again setresponsepage(new editpontopage(obj, pageorigin)) } } add(form); form.setoutputmarkupid(true) container = new webmarkupcontainer("container") form.add(container); }
i'm working on code couple of hours , didn't wrong.
could me it?
Comments
Post a Comment