- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想在 t:grid 组件中显示一个项目列表,但我不知道为什么我得到一个 NP
我 100% 确定我正在重新调整的列表不为空。这是调用访问数据的方法的页面的 java 部分:
public class MyTelephones {
@Property
@SessionState
private User user;
@Property
@Persist
private Telephone telephone;
@Property
@Inject
private UserDataAccess userDataAccess;
public List<Telephone> showTelephones() {
return userDataAccess.getUsersTelephones(user.getName());
}
这是带有应显示它们的标记的页面:
<html xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd">
<head>
<title>Show your telephones</title>
</head>
<body>
<h1>These are your telephones [${user.name}]</h1>
<t:grid source="${showTelephones()}" row="${telephone}"/>
<h3><t:pagelink t:page="Index">Go back!</t:pagelink></h3>
</body>
</html>
这是我得到的错误?
[ERROR] pages.MyTelephones Render queue error in BeginRender[MyTelephones:grid.rows]: Failure writing parameter 'row' of component MyTelephones:grid.rows: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException
org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid.rows: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at classpath:org/apache/tapestry5/corelib/components/Grid.tml, line 8]
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:194)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:246)
at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:127)
at $PageRenderQueue_1309430978d.render($PageRenderQueue_1309430978d.java)
at $PageRenderQueue_13094309785.render($PageRenderQueue_13094309785.java)
at org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:2089)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2073)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:2055)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:2040)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2026)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:2008)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1989)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at $MarkupRenderer_1309430978c.renderMarkup($MarkupRenderer_1309430978c.java)
at org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
at $PageMarkupRenderer_1309430978a.renderPageMarkup($PageMarkupRenderer_1309430978a.java)
at org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
at $PageResponseRenderer_130943096d0.renderPageResponse($PageResponseRenderer_130943096d0.java)
at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)
at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2326)
at $PageRenderRequestHandler_130943096d2.handle($PageRenderRequestHandler_130943096d2.java)
at $PageRenderRequestHandler_130943096cc.handle($PageRenderRequestHandler_130943096cc.java)
at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
at $ComponentRequestHandler_130943096cd.handlePageRender($ComponentRequestHandler_130943096cd.java)
at $ComponentRequestHandler_130943096b1.handlePageRender($ComponentRequestHandler_130943096b1.java)
at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
at $Dispatcher_130943096b3.dispatch($Dispatcher_130943096b3.java)
at $Dispatcher_130943096ae.dispatch($Dispatcher_130943096ae.java)
at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
at com.mirsad.services.AppModule$1.service(AppModule.java:96)
at $RequestFilter_130943096ad.service($RequestFilter_130943096ad.java)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:984)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:974)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:80)
at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at $RequestHandler_130943096a4.service($RequestHandler_130943096a4.java)
at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272)
at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_130943096a6.service($HttpServletRequestHandler_130943096a6.java)
at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_130943096a3.service($HttpServletRequestFilter_130943096a3.java)
at $HttpServletRequestHandler_130943096a6.service($HttpServletRequestHandler_130943096a6.java)
at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
at $HttpServletRequestHandler_130943096a6.service($HttpServletRequestHandler_130943096a6.java)
at $HttpServletRequestHandler_130943096a1.service($HttpServletRequestHandler_130943096a1.java)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
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:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid.rows: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at classpath:org/apache/tapestry5/corelib/components/Grid.tml, line 8]
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:350)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.set(ParameterWorker.java:296)
at org.apache.tapestry5.corelib.components.GridRows._$set_row(GridRows.java)
at org.apache.tapestry5.corelib.components.GridRows.setupForRow(GridRows.java:283)
at org.apache.tapestry5.corelib.components.GridRows.beginRender(GridRows.java:304)
at org.apache.tapestry5.corelib.components.GridRows$MethodAccess_beginRender_13094309850.invoke(GridRows$MethodAccess_beginRender_13094309850.java)
at org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117)
at org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86)
at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at org.apache.tapestry5.corelib.components.GridRows.beginRender(GridRows.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:239)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:176)
... 81 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at org.apache.tapestry5.corelib.components.Grid.rows]
at org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:76)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:346)
... 92 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at classpath:com/mirsad/pages/MyTelephones.tml, line 7]
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:350)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.set(ParameterWorker.java:296)
at org.apache.tapestry5.corelib.components.Grid._$set_row(Grid.java)
at org.apache.tapestry5.corelib.components.Grid.setRow(Grid.java:577)
at $PropertyConduit_13094309896.set($PropertyConduit_13094309896.java)
at org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:72)
... 93 more
Caused by: java.lang.NullPointerException
at org.apache.tapestry5.internal.bindings.AbstractBinding.getBindingType(AbstractBinding.java:63)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:344)
... 98 more
[INFO] AppModule.TimingFilter Request time: 141 ms
[ERROR] TapestryModule.RequestExceptionHandler Processing of request failed with uncaught exception: Render queue error in BeginRender[MyTelephones:grid.rows]: Failure writing parameter 'row' of component MyTelephones:grid.rows: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException
org.apache.tapestry5.internal.services.RenderQueueException: Render queue error in BeginRender[MyTelephones:grid.rows]: Failure writing parameter 'row' of component MyTelephones:grid.rows: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at classpath:org/apache/tapestry5/corelib/components/Grid.tml, line 8]
at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:84)
at org.apache.tapestry5.internal.services.PageRenderQueueImpl.render(PageRenderQueueImpl.java:127)
at $PageRenderQueue_1309430978d.render($PageRenderQueue_1309430978d.java)
at $PageRenderQueue_13094309785.render($PageRenderQueue_13094309785.java)
at org.apache.tapestry5.internal.services.MarkupRendererTerminator.renderMarkup(MarkupRendererTerminator.java:37)
at org.apache.tapestry5.services.TapestryModule$29.renderMarkup(TapestryModule.java:2089)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$28.renderMarkup(TapestryModule.java:2073)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$27.renderMarkup(TapestryModule.java:2055)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$26.renderMarkup(TapestryModule.java:2040)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$25.renderMarkup(TapestryModule.java:2026)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$24.renderMarkup(TapestryModule.java:2008)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at org.apache.tapestry5.services.TapestryModule$23.renderMarkup(TapestryModule.java:1989)
at $MarkupRenderer_1309430978f.renderMarkup($MarkupRenderer_1309430978f.java)
at $MarkupRenderer_1309430978c.renderMarkup($MarkupRenderer_1309430978c.java)
at org.apache.tapestry5.internal.services.PageMarkupRendererImpl.renderPageMarkup(PageMarkupRendererImpl.java:47)
at $PageMarkupRenderer_1309430978a.renderPageMarkup($PageMarkupRenderer_1309430978a.java)
at org.apache.tapestry5.internal.services.PageResponseRendererImpl.renderPageResponse(PageResponseRendererImpl.java:67)
at $PageResponseRenderer_130943096d0.renderPageResponse($PageResponseRenderer_130943096d0.java)
at org.apache.tapestry5.internal.services.PageRenderRequestHandlerImpl.handle(PageRenderRequestHandlerImpl.java:64)
at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2326)
at $PageRenderRequestHandler_130943096d2.handle($PageRenderRequestHandler_130943096d2.java)
at $PageRenderRequestHandler_130943096cc.handle($PageRenderRequestHandler_130943096cc.java)
at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handlePageRender(ComponentRequestHandlerTerminator.java:48)
at org.apache.tapestry5.services.InitializeActivePageName.handlePageRender(InitializeActivePageName.java:47)
at $ComponentRequestHandler_130943096cd.handlePageRender($ComponentRequestHandler_130943096cd.java)
at $ComponentRequestHandler_130943096b1.handlePageRender($ComponentRequestHandler_130943096b1.java)
at org.apache.tapestry5.internal.services.PageRenderDispatcher.dispatch(PageRenderDispatcher.java:45)
at $Dispatcher_130943096b3.dispatch($Dispatcher_130943096b3.java)
at $Dispatcher_130943096ae.dispatch($Dispatcher_130943096ae.java)
at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:321)
at com.mirsad.services.AppModule$1.service(AppModule.java:96)
at $RequestFilter_130943096ad.service($RequestFilter_130943096ad.java)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:984)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:974)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:80)
at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85)
at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103)
at $RequestHandler_130943096af.service($RequestHandler_130943096af.java)
at $RequestHandler_130943096a4.service($RequestHandler_130943096a4.java)
at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:272)
at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53)
at $HttpServletRequestHandler_130943096a6.service($HttpServletRequestHandler_130943096a6.java)
at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
at $HttpServletRequestFilter_130943096a3.service($HttpServletRequestFilter_130943096a3.java)
at $HttpServletRequestHandler_130943096a6.service($HttpServletRequestHandler_130943096a6.java)
at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:928)
at $HttpServletRequestHandler_130943096a6.service($HttpServletRequestHandler_130943096a6.java)
at $HttpServletRequestHandler_130943096a1.service($HttpServletRequestHandler_130943096a1.java)
at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:147)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
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:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid.rows: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at classpath:org/apache/tapestry5/corelib/components/Grid.tml, line 8]
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:194)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.render(ComponentPageElementImpl.java:246)
at org.apache.tapestry5.internal.services.RenderQueueImpl.run(RenderQueueImpl.java:72)
... 79 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid.rows: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at classpath:org/apache/tapestry5/corelib/components/Grid.tml, line 8]
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:350)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.set(ParameterWorker.java:296)
at org.apache.tapestry5.corelib.components.GridRows._$set_row(GridRows.java)
at org.apache.tapestry5.corelib.components.GridRows.setupForRow(GridRows.java:283)
at org.apache.tapestry5.corelib.components.GridRows.beginRender(GridRows.java:304)
at org.apache.tapestry5.corelib.components.GridRows$MethodAccess_beginRender_13094309850.invoke(GridRows$MethodAccess_beginRender_13094309850.java)
at org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$Invoker.invoke(RenderPhaseMethodWorker.java:117)
at org.apache.tapestry5.internal.transform.RenderPhaseMethodWorker$RenderPhaseMethodAdvice.advise(RenderPhaseMethodWorker.java:86)
at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
at org.apache.tapestry5.corelib.components.GridRows.beginRender(GridRows.java)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$BeginRenderPhase.invokeComponent(ComponentPageElementImpl.java:239)
at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$AbstractPhase.invoke(ComponentPageElementImpl.java:176)
... 81 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at org.apache.tapestry5.corelib.components.Grid.rows]
at org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:76)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:346)
... 92 more
Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException: Failure writing parameter 'row' of component MyTelephones:grid: java.lang.NullPointerException [at classpath:com/mirsad/pages/MyTelephones.tml, line 7]
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:350)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.set(ParameterWorker.java:296)
at org.apache.tapestry5.corelib.components.Grid._$set_row(Grid.java)
at org.apache.tapestry5.corelib.components.Grid.setRow(Grid.java:577)
at $PropertyConduit_13094309896.set($PropertyConduit_13094309896.java)
at org.apache.tapestry5.internal.bindings.PropBinding.set(PropBinding.java:72)
... 93 more
Caused by: java.lang.NullPointerException
at org.apache.tapestry5.internal.bindings.AbstractBinding.getBindingType(AbstractBinding.java:63)
at org.apache.tapestry5.internal.transform.ParameterWorker$2$1.writeToBinding(ParameterWorker.java:344)
... 98 more
127.0
怎么了,我是否正确调用了 showTelephones() 方法?
有没有其他方法可以将参数 user.name 传递给方法 getUsersTelephones(),但从标记页面内传递?
最佳答案
问题出在你的符号上。您的模板应该是:
<t:grid source="showTelephones" row="telephone"/>
你的 java 应该是:
public class MyTelephones {
@Property
@SessionState
private User user;
@Property
private Telephone telephone;
@Property
@Inject
private UserDataAccess userDataAccess;
public List<Telephone> getShowTelephones() {
return userDataAccess.getUsersTelephones(user.getName());
}
由于网格位于 Tapestry 命名空间中,因此您不需要使用 ${}。我有点困惑为什么 Tapestry 不提示你的符号并抛出 NPE,但我很确定这会为你解决它。
PS:@Persist'ing 你的行值不是一个好主意,因为它只会保留你表中的最新行。
关于java - 显示 Tapestry 网格组件的困难。 (Apache Tapestry 5 框架),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6361481/
tuple :: (Integer a,Fractional b) => (a,b,String) tuple = (18,5.55,"Charana") 所以这是给我的错误 ‘Integer’ is
关闭。这个问题是off-topic .它目前不接受答案。 想改进这个问题吗? Update the question所以它是on-topic用于堆栈溢出。 关闭 11 年前。 Improve thi
我已经习惯了python和django,但我最近开始学习java。由于工作原因我没有太多时间,所以错过了很多类(class),现在我有点困惑,我必须做作业。 编辑 该程序应该根据每个运动员在自行车和比
这是一个困难的问题,但对专业人士来说很容易。 我在 mysql 中有以下字段:产品名称、mycost、sellprice 和 stock。因为我需要知道每种产品对我的商店的投资有多少,所以我创建了以下
我有 3 个表,其中已包含以下行: TBL_TESTER_LIST id tester_type tester_name 1 LMX LMX-01 2 LMX
我想只使用 GridBagLayout 来布局组件,如图所示。 我已经尝试了几个约束,但它永远不会以预期的结果结束,所以我想知道仅使用 GridBagLayout 是否真的可行。难点在于C1、C2、C
我遇到了以下代码没有结果的问题。但是,如果我取消注释掉指定的行,并注释掉它起作用的 bind_param 行,但这不是破坏了 mysqli 的目的吗?我的 var_dump 给了我的字符串(1)“1”
这个问题在这里已经有了答案: a good python to exe compiler? [closed] (3 个答案) 关闭 9 年前。 有了我之前问题的一些有用答案(见下文),我决定再试一次
我正在使用 Hadoop 分析 GSOD 数据 (ftp://ftp.ncdc.noaa.gov/pub/data/gsod/)。我选择了 5 年来执行我的实验 (2005 - 2009)。我配置了一
我在我的 macOS 应用程序的设置面板中使用 NSGridView。我是这样设置的: class GeneralViewController: RootViewController { pr
我正在尝试使用以下代码在 PHP 中自动安装 WordPress 发行版: $base_dir = '/home/username/wordpress_location'; chdir($base_d
在 Node.js 中将图像转换为 Base64 字符串时,我遇到了一个非常令人困惑的问题 这是我的示例代码: app.get('/image', (req, res) => { ServerAP
我在尝试运行我的应用程序时遇到一些错误,这里是 logcat java.lang.RuntimeException: Unable to instantiate activity Componen
基本上,我正在努力创建一个管理团队和球员的 Java 程序。 根据我的理解,我会有一个团队和一个玩家类。在团队类中会有 get 和 set 方法,以及某种形式的集合来正确存储球员,例如数组列表?然后在
我仍在尝试找出 JavaSwing 中的 BorderLayout,这真的很令人沮丧。 我希望能够将一个 Pane 拆分为 3 个包含的子面板,但我不完全确定如何包含它。 这是我的游戏类,它包含面板
下面的表设计(完整的模式见下文)还有很多需要改进的地方,并且已经造成了许多困难,但是我无法找出如何最好地将它们规范化。这些表格的目的是: ICD9-提供CICD9和CDESC组合的主查找。每个组合在I
这是我的表格: AB元组表 C 表,其中包含 A.id 和 B.id 的条目 D 表,其中包含带有 C.id 的条目和一个 bool 字段“open” 我想计算 D 表中“open”= true 且具
我在 YouTube 上跟踪了一个相当旧的教程,在视频中他以这种方式使用了 mysql_result: return (mysql_result($result,0) == 1) ? true : f
我正在尝试创建一个左侧面板的页面。该面板有一个页眉、一个内容区域和一个页脚。主面板包装器 div 应该是页面高度的 100%。页眉和页脚没有指定的高度,因为我只希望它们足够大以容纳其文本和填充,而我希
我有 TreeView ,我想在其中显示用户通过 file_dialog.getOpenFileNames() 选择的文件; file_dialog 是 QFileDialog。我确实创建了模型类:
我是一名优秀的程序员,十分优秀!