I removed the error by modifying the code:

protected void onConfirm() {
                                                                                
                PostService postService = new PostService();
                                                                                
                int postId = ((PostDomain) listItem
                                                                                
                                .getModelObject())
                                                                                
                                .getPostId();
                                                                                
                try {
                                                                                
                        postService
                                                                                
                                        .deletePost(postId);
                                                                                
                        *setResponsePage(getPage().getPageClass());* // added 
here
                                                                                
                } catch (Exception exception) {
                                                                                
                        error(exception.getMessage());
                                                                                
                }
                                                                                
                this.replaceWith(ShowPostPanel.this);
                                                                                
        }

Now the error is:

*org.apache.wicket.request.handler.ComponentNotFoundException: Could not
find component
'userTypePanel:userType:0:showPostPanel:postDomainListContainer:post:0:postForm:postDeleteButton'
on page 'class WalknShine.Home.Home
*     at
org.apache.wicket.request.handler.PageAndComponentProvider.getComponent(PageAndComponentProvider.java:181)
     at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.getComponent(ListenerInterfaceRequestHandler.java:92)
     at
org.apache.wicket.request.handler.ListenerInterfaceRequestHandler.respond(ListenerInterfaceRequestHandler.java:239)
     at
org.apache.wicket.request.cycle.RequestCycle$HandlerExecutor.respond(RequestCycle.java:781)
     at
org.apache.wicket.request.RequestHandlerStack.execute(RequestHandlerStack.java:64)

ShowPostPanel is present inside UserTypePanel. Why it is searching  that as
I have given ShowPostPanel to be replaced??

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Problem-in-adding-user-confirmation-feature-by-wicket-way-tp4649510p4649512.html
Sent from the Users forum mailing list archive at Nabble.com.

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

Reply via email to