Re: IllegalStateException with AjaxFallbackDefaultDataTable
Any updates on this one? I think I'm experiencing the same issue; I'm building a DataView, in its nodes there's a TextField with an OnChangeAjaxBehavior added to it. Then, from the RequestCycle, an error occurs when cleaning up the AjaxRequestTarget, followed by an IllegalStateException: no page found for component ... referring to this textfield. Thanks, Antoine. On Sat, Feb 9, 2008 at 12:59 AM, jwray [EMAIL PROTECTED] wrote: Igor, thanks for the help, I'll have to look at in detail next week. What is odd to me is that I'm not doing anything out of the ordinary. I add the table to the ajax target, and I don't remove any components myself. Jonny igor.vaynberg wrote: hm, i still dont see the problem spot the error is apparent you are adding something to the ajax request target that is then removed from the page, so when ajaxrequesttarget is trying to detach the page it cant, because it does component.getPage().detach(); apparently the component is removed from the page, so getpage() throws that error you see. if i were you i would set a breakpoint at that line, and see what component exactly is removed from the page, and then try to figure out why it is removed from the page and yet is added to the ajax target. -igor On Feb 8, 2008 9:47 AM, jwray [EMAIL PROTECTED] wrote: Hi Igor, I was hoping it would be an obvious problem. Here's my table construction code (is there a better way of posting code?) ListIColumn columns = new ArrayListIColumn(); PostOnSubmitAction peptideUpdateAction = new PostOnSubmitAction(); columns.add(new AjaxEditablePropertyColumn(peptideUpdateAction, new Model(Comments), comments, comments, REQUIRED_ROLE)); PeptideDataProvider dataProvider = new PeptideDataProvider(service); peptideViewTable = new AjaxFallbackDefaultDataTable(dataTable, columns, dataProvider, 25); where the PostOnSubmitAction below is called from the onSubmit method of the AjaxEditableLabel within the AjaxEditablePropertyColumn. I'm attempting to refresh the table when an OptimisticLockingFailureException occurs (and so load the data altered by another user). private class PostOnSubmitAction implements AjaxEditablePropertyColumn.PostOnSubmitAction{ public void postOnSubmit(AjaxRequestTarget target, Object value) { target.addComponent(getStatusPanel()); Peptide peptide = (Peptide)value; try{ peptideServices.updatePeptide(peptide); } catch(AccessDeniedException e){ String message = You don't have permission to perform this operation; PeptidePage.this.error(message); } catch(OptimisticLockingFailureException e){ String message = Another user modified this data before you. Review the new data and resubmit changes if needed.; PeptidePage.this.error(message); target.addComponent(peptideViewTable); } catch(RuntimeException e){ String message = An unexpected error occured. +e.getMessage(); PeptidePage.this.error(message); } } } thanks Jonny igor.vaynberg wrote: some code would help us help you... -igor -- View this message in context: http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15360512.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15366611.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- Antoine van Wel http://www.wellawaretech.com - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException with AjaxFallbackDefaultDataTable
Antoine, I actually approached the problem from a different direction in the end and avoided this error. But, before I did that I tracked it down to calling super.onSubmit call in the overridden onSubmit method of the AjaxEditableLabel. I didn't get any further than that I'm afraid. hope it helps, Jonny Antoine van Wel wrote: Any updates on this one? I think I'm experiencing the same issue; I'm building a DataView, in its nodes there's a TextField with an OnChangeAjaxBehavior added to it. Then, from the RequestCycle, an error occurs when cleaning up the AjaxRequestTarget, followed by an IllegalStateException: no page found for component ... referring to this textfield. Thanks, Antoine. -- View this message in context: http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15741718.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException with AjaxFallbackDefaultDataTable
Hi Igor, I was hoping it would be an obvious problem. Here's my table construction code (is there a better way of posting code?) ListIColumn columns = new ArrayListIColumn(); PostOnSubmitAction peptideUpdateAction = new PostOnSubmitAction(); columns.add(new AjaxEditablePropertyColumn(peptideUpdateAction, new Model(Comments), comments, comments, REQUIRED_ROLE)); PeptideDataProvider dataProvider = new PeptideDataProvider(service); peptideViewTable = new AjaxFallbackDefaultDataTable(dataTable, columns, dataProvider, 25); where the PostOnSubmitAction below is called from the onSubmit method of the AjaxEditableLabel within the AjaxEditablePropertyColumn. I'm attempting to refresh the table when an OptimisticLockingFailureException occurs (and so load the data altered by another user). private class PostOnSubmitAction implements AjaxEditablePropertyColumn.PostOnSubmitAction{ public void postOnSubmit(AjaxRequestTarget target, Object value) { target.addComponent(getStatusPanel()); Peptide peptide = (Peptide)value; try{ peptideServices.updatePeptide(peptide); } catch(AccessDeniedException e){ String message = You don't have permission to perform this operation; PeptidePage.this.error(message); } catch(OptimisticLockingFailureException e){ String message = Another user modified this data before you. Review the new data and resubmit changes if needed.; PeptidePage.this.error(message); target.addComponent(peptideViewTable); } catch(RuntimeException e){ String message = An unexpected error occured. +e.getMessage(); PeptidePage.this.error(message); } } } thanks Jonny igor.vaynberg wrote: some code would help us help you... -igor -- View this message in context: http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15360512.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException with AjaxFallbackDefaultDataTable
hm, i still dont see the problem spot the error is apparent you are adding something to the ajax request target that is then removed from the page, so when ajaxrequesttarget is trying to detach the page it cant, because it does component.getPage().detach(); apparently the component is removed from the page, so getpage() throws that error you see. if i were you i would set a breakpoint at that line, and see what component exactly is removed from the page, and then try to figure out why it is removed from the page and yet is added to the ajax target. -igor On Feb 8, 2008 9:47 AM, jwray [EMAIL PROTECTED] wrote: Hi Igor, I was hoping it would be an obvious problem. Here's my table construction code (is there a better way of posting code?) ListIColumn columns = new ArrayListIColumn(); PostOnSubmitAction peptideUpdateAction = new PostOnSubmitAction(); columns.add(new AjaxEditablePropertyColumn(peptideUpdateAction, new Model(Comments), comments, comments, REQUIRED_ROLE)); PeptideDataProvider dataProvider = new PeptideDataProvider(service); peptideViewTable = new AjaxFallbackDefaultDataTable(dataTable, columns, dataProvider, 25); where the PostOnSubmitAction below is called from the onSubmit method of the AjaxEditableLabel within the AjaxEditablePropertyColumn. I'm attempting to refresh the table when an OptimisticLockingFailureException occurs (and so load the data altered by another user). private class PostOnSubmitAction implements AjaxEditablePropertyColumn.PostOnSubmitAction{ public void postOnSubmit(AjaxRequestTarget target, Object value) { target.addComponent(getStatusPanel()); Peptide peptide = (Peptide)value; try{ peptideServices.updatePeptide(peptide); } catch(AccessDeniedException e){ String message = You don't have permission to perform this operation; PeptidePage.this.error(message); } catch(OptimisticLockingFailureException e){ String message = Another user modified this data before you. Review the new data and resubmit changes if needed.; PeptidePage.this.error(message); target.addComponent(peptideViewTable); } catch(RuntimeException e){ String message = An unexpected error occured. +e.getMessage(); PeptidePage.this.error(message); } } } thanks Jonny igor.vaynberg wrote: some code would help us help you... -igor -- View this message in context: http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15360512.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException with AjaxFallbackDefaultDataTable
Igor, thanks for the help, I'll have to look at in detail next week. What is odd to me is that I'm not doing anything out of the ordinary. I add the table to the ajax target, and I don't remove any components myself. Jonny igor.vaynberg wrote: hm, i still dont see the problem spot the error is apparent you are adding something to the ajax request target that is then removed from the page, so when ajaxrequesttarget is trying to detach the page it cant, because it does component.getPage().detach(); apparently the component is removed from the page, so getpage() throws that error you see. if i were you i would set a breakpoint at that line, and see what component exactly is removed from the page, and then try to figure out why it is removed from the page and yet is added to the ajax target. -igor On Feb 8, 2008 9:47 AM, jwray [EMAIL PROTECTED] wrote: Hi Igor, I was hoping it would be an obvious problem. Here's my table construction code (is there a better way of posting code?) ListIColumn columns = new ArrayListIColumn(); PostOnSubmitAction peptideUpdateAction = new PostOnSubmitAction(); columns.add(new AjaxEditablePropertyColumn(peptideUpdateAction, new Model(Comments), comments, comments, REQUIRED_ROLE)); PeptideDataProvider dataProvider = new PeptideDataProvider(service); peptideViewTable = new AjaxFallbackDefaultDataTable(dataTable, columns, dataProvider, 25); where the PostOnSubmitAction below is called from the onSubmit method of the AjaxEditableLabel within the AjaxEditablePropertyColumn. I'm attempting to refresh the table when an OptimisticLockingFailureException occurs (and so load the data altered by another user). private class PostOnSubmitAction implements AjaxEditablePropertyColumn.PostOnSubmitAction{ public void postOnSubmit(AjaxRequestTarget target, Object value) { target.addComponent(getStatusPanel()); Peptide peptide = (Peptide)value; try{ peptideServices.updatePeptide(peptide); } catch(AccessDeniedException e){ String message = You don't have permission to perform this operation; PeptidePage.this.error(message); } catch(OptimisticLockingFailureException e){ String message = Another user modified this data before you. Review the new data and resubmit changes if needed.; PeptidePage.this.error(message); target.addComponent(peptideViewTable); } catch(RuntimeException e){ String message = An unexpected error occured. +e.getMessage(); PeptidePage.this.error(message); } } } thanks Jonny igor.vaynberg wrote: some code would help us help you... -igor -- View this message in context: http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15360512.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- View this message in context: http://www.nabble.com/IllegalStateException-with-AjaxFallbackDefaultDataTable-tp15347366p15366611.html Sent from the Wicket - User mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IllegalStateException with AjaxFallbackDefaultDataTable
some code would help us help you... -igor On Feb 7, 2008 5:47 PM, jwray [EMAIL PROTECTED] wrote: Thanks for the reply. I'm sure it does have something to do with ordering, and probably the slightly circular nature of the situation in which an AjaxEditableLabel is embedded within a DataTable cell and then tries to update the containing table by adding the table to the ajax target within its onSubmit method. But, I'm at the limit of my knowledge here about whether such an action should be possible given the wicket component lifecycle. The stack trace is complaining about a cell within the table not having a page, but that is something dealt with by the table, and nothing I do. thanks, Jonny Christian Alejandro Marquez Grabia wrote: Are you sure the component has been already added to the page before calling the getPage() method? On 2/7/08, jwray [EMAIL PROTECTED] wrote: Hi, I'm experiencing an IllegalStateException (stack trace below) that I can't get rid of. I have a AjaxFallbackDefaultDataTable with columns made up of an extension of PropertyColumn that places an AjaxEditableLabel into the cell within the populateItem. This works great until I attempt to add the table itself to the AjaxRequestTarget within the AjaxEditableLabel onSubmit method. I need to force a refresh of the table in a specific situation (Actually, just the data underlying the table row being edited, but I don't know a way of doing just that). Even though I get the exception the behaviour is as expected, in that the table updates. Other components also update fine and without exceptions. Any ideas or other approaches that would avoid this error? thanks Jonny Stack Trace: ERROR [org.apache.wicket.RequestCycle] - there was an error cleaning up target [EMAIL PROTECTED] markupIdToComponent [{cell427=[MarkupContainer [Co mponent id = cell, page = No Page, path = 26:cells:4:cell.AjaxEditablePropertyColumn$1]], status3=[MarkupContainer [Component id = status, page = net.fiveprim e.mtwo.PeptidePage, path = 0:status.FeedbackPanel, isVisible = true, isVersioned = false]], dataTable13=[MarkupContainer [Component id = dataTable, page = net.f iveprime.mtwo.PeptidePage, path = 0:tabs:panel:dataTable.AjaxFallbackDefaultDataTable, isVisible = true, isVersioned = false]]}], prependJavascript [[]], append Javascript [[window.status='';]]. java.lang.IllegalStateException: No Page found for component [MarkupContainer [Component id = cell, page = No Page, path = 26:cells:4:cell.AjaxEditablePropert yColumn$1]] at org.apache.wicket.Component.getPage(Component.java:1639) at org.apache.wicket.ajax.AjaxRequestTarget.detach(AjaxRequestTarget.java :437) at org.apache.wicket.RequestCycle.detach(RequestCycle.java:1046) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1334) at org.apache.wicket.RequestCycle.request(RequestCycle.java:493) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:354) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java :194) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter( ServletHandler.java:1084) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:264) at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter( HttpSessionContextIntegrationFilter.java:191) at org.acegisecurity.util.FilterChainProxy$VirtualFilterChain.doFilter( FilterChainProxy.java:274) at org.acegisecurity.util.FilterChainProxy.doFilter(FilterChainProxy.java :148) at org.acegisecurity.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java :90) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter( ServletHandler.java:1084) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java :216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:726) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405) at org.mortbay.jetty.handler.ContextHandlerCollection.handle( ContextHandlerCollection.java:206) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java :114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139) at org.mortbay.jetty.Server.handle(Server.java:324) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505) at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete( HttpConnection.java:828) at