On Sun, 10 Sep 2006 02:57:29 +0430, Eelco Hillenius <[EMAIL PROTECTED]> wrote:
> If you can use Ajax, you could even implement it more transparently. > In that case, make a panel for the normal display of the row, and a > panel that has the buttons. When the row is clicked, you do an ajax > roundtrip, and replace the display component with the buttons > component. And attached to these buttons are yet two other ajax round > trips, one for canceling that would redisplay the normal row, and the > other would delete the row and let the whole list component render > itself (be careful: don't re-render a lists with ajax directly, but > instead re-render the parent of the list. in ConfrimPanel, ajax of cancel button want replace its parent [it's ConfrimPanel] with person panel public ConfrimPanel(final String id, final MarkupContainer row, final Person person) { super(id ); setOutputMarkupId(true); add(new AjaxFallbackLink("ok") { public void onClick(final AjaxRequestTarget target) { Application1.getPersons().remove(person); target.addComponent(row.getParent().getParent()); } }); add(new AjaxFallbackLink("cancel") { public void onClick(final AjaxRequestTarget target) { PersonPanel personPanel = new PersonPanel(id, person); // reuse a same id for two panel. row.replace(personPanel); // replacing, call page.componentRemoved(aConfrimPanel); target.addComponent(personPanel); } }); } on AbstractDefaultAjaxBehavior public final void onRequest() { ... finally {getComponent().getPage().setVersioned(isPageVersioned); } getComponent() = aConfrimPanel getPage() = null maybe i missing things but wicket tell : ERROR RequestCycle - No Page found for component [MarkupContainer [Component id = cancel, page = <No Page>, path = person_or_confrim:cancel.Home$ConfrimPanel$2]] java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = cancel, page = <No Page>, path = person_or_confrim:cancel.Home$ConfrimPanel$2]] at wicket.Component.getPage(Component.java:1041) at wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:220) at wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:98) at wicket.request.compound.DefaultEventProcessorStrategy.processEvents(DefaultEventProcessorStrategy.java:65) at wicket.request.compound.AbstractCompoundRequestCycleProcessor.processEvents(AbstractCompoundRequestCycleProcessor.java:57) at wicket.RequestCycle.doProcessEventsAndRespond(RequestCycle.java:822) at wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:855) at wicket.RequestCycle.step(RequestCycle.java:936) at wicket.RequestCycle.steps(RequestCycle.java:1010) at wicket.RequestCycle.request(RequestCycle.java:452) at wicket.protocol.http.WicketServlet.doGet(WicketServlet.java:210) at javax.servlet.http.HttpServlet.service(HttpServlet.java:743) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:358) at org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationHandler.java:294) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:567) at org.mortbay.http.HttpContext.handle(HttpContext.java:1807) at org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationContext.java:525) at org.mortbay.http.HttpContext.handle(HttpContext.java:1757) at org.mortbay.http.HttpServer.service(HttpServer.java:879) at org.mortbay.http.HttpConnection.service(HttpConnection.java:789) at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:960) at org.mortbay.http.HttpConnection.handle(HttpConnection.java:806) at org.mortbay.http.SocketListener.handleConnection(SocketListener.java:218) at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:331) at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:520) -- Using Opera's revolutionary e-mail client: http://www.opera.com/mail/ ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Wicket-user mailing list Wicket-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wicket-user