[ https://issues.apache.org/jira/browse/WICKET-3162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
smallufo updated WICKET-3162: ----------------------------- Attachment: CommentsPanel.html > NPE when the underlaying model changed and ajax re-appear. > ----------------------------------------------------------- > > Key: WICKET-3162 > URL: https://issues.apache.org/jira/browse/WICKET-3162 > Project: Wicket > Issue Type: Bug > Affects Versions: 1.4.13 > Environment: wicket 1.4.13 > Reporter: smallufo > Attachments: CommentsPanel.html > > > <span wicket:id="border"> > <wicket:container wicket:id="commentsView"> > <div> > //comment layout > </div> > </wicket:container> > </span> > And the code : > add(border); > ListView<Comment> commentsView = new ListView<Comment>("commentsView" , new > LoadableDetachableModel<List<Comment>>() > { > @Override > protected List<Comment> load() { > return commentDao.getComments(0 , 10); > } > }) > { > @Override > protected void populateItem(ListItem<Comment> item) { > //comment layout > } > }; > border.add(commentsView); > commentsView.setReuseItems(false); > The Panel has a border , with a clickable button , can be used to > collapse/expand the content of the border with AJAX. > Here is my steps : > 1. I first collapse the panel . > 2. Then open another browser panel , add a comment. (the underlaying data > model is changed) > 3. Back to the original panel , expand the panel ... > And I got a NPE : > 2010-11-12 05:19:12,661 ERROR wicket.RequestCycle - Exception in rendering > component: [MarkupContainer [Component id = _body]] > org.apache.wicket.WicketRuntimeException: Exception in rendering component: > [MarkupContainer [Component id = _body]] > at org.apache.wicket.Component.renderComponent(Component.java:2725) > at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538) > at org.apache.wicket.Component.render(Component.java:2517) > at > org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440) > at > org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603) > at > org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527) > at org.apache.wicket.Component.renderComponent(Component.java:2686) > at > org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538) > ... > Caused by: java.lang.NullPointerException > at > org.apache.wicket.markup.html.border.Border$BorderBodyContainer.onComponentTagBody(Border.java:375) > at org.apache.wicket.Component.renderComponent(Component.java:2686) > ... 45 more > > -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.