Hi, I'd like to customize FormComponentFeedbackBorder class to provide a error icon, so I extend FormComponentFeedbackBorder class and copy FormComponentFeedbackBorder.html from wicket source. I modify FormComponentFeedbackBorder.html to add below:
<wicket:border> <span wicket:id="errorIndicator"><img alt="Error!" src="icon.gif"/><span style="color:red;">!</span><br/></span> <wicket:body/> </wicket:border> If I remove <img> tag from my html, my application works fine, but add <img> tag, it will show below exception message: WicketMessage: Exception in rendering component: [MarkupContainer [Component id = _header_0]] Root cause: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:768) at org.apache.wicket.markup.MarkupCache$DefaultCacheImplementation.get(MarkupCache.java:744) at org.apache.wicket.markup.MarkupCache.removeMarkup(MarkupCache.java:131) at org.apache.wicket.markup.MarkupCache.loadMarkup(MarkupCache.java:491) at org.apache.wicket.markup.MarkupCache.loadMarkupAndWatchForChanges(MarkupCache.java:559) at org.apache.wicket.markup.MarkupCache.getMarkup(MarkupCache.java:325) at org.apache.wicket.markup.MarkupCache.getMarkupStream(MarkupCache.java:216) at org.apache.wicket.MarkupContainer.getAssociatedMarkupStream(MarkupContainer.java:351) at org.apache.wicket.markup.html.ContainerWithAssociatedMarkupHelper.renderHeadFromAssociatedMarkupFile(ContainerWithAssociatedMarkupHelper.java:72) at org.apache.wicket.markup.html.WebMarkupContainerWithAssociatedMarkup.renderHeadFromAssociatedMarkupFile(WebMarkupContainerWithAssociatedMarkup.java:73) at org.apache.wicket.markup.html.panel.Panel.renderHead(Panel.java:137) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer$1.component(HtmlHeaderContainer.java:231) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:878) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:893) at org.apache.wicket.MarkupContainer.visitChildren(MarkupContainer.java:918) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.renderHeaderSections(HtmlHeaderContainer.java:222) at org.apache.wicket.markup.html.internal.HtmlHeaderContainer.onComponentTagBody(HtmlHeaderContainer.java:137) at org.apache.wicket.Component.renderComponent(Component.java:2626) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:80) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1552) at org.apache.wicket.Page.onRender(Page.java:1545) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.Page.renderPage(Page.java:914) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) at org.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:289) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Complete stack: org.apache.wicket.WicketRuntimeException: Exception in rendering component: [MarkupContainer [Component id = _header_0]] at org.apache.wicket.Component.renderComponent(Component.java:2665) at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1536) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229) at org.apache.wicket.markup.resolver.HtmlHeaderResolver.resolve(HtmlHeaderResolver.java:80) at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1441) at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1552) at org.apache.wicket.Page.onRender(Page.java:1545) at org.apache.wicket.Component.render(Component.java:2457) at org.apache.wicket.Page.renderPage(Page.java:914) at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:262) at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105) at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1428) at org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:456) Please tell me why NullPointException just by adding a <img> html tag? Thank you very much -- ------------------ ~Mia は 最高!~ ------------------