1
我想在t顯示:電網組件的項目清單,但我不知道爲什麼我得到一個NP顯示掛毯網格組件的困難。 (Apache的掛毯5框架)
我相信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(),但從標記頁?
是的,它的工作原理。所以我不總是需要使用baces {}。是我使用@Property註解的原因嗎?如果我使用get和set方法,那麼我需要說$ {telephone}? – sfrj 2011-06-15 20:16:16
不,該屬性字面上與getter和setters相同。如果您在.tml文件中設置的屬性與組件中的某個參數相關,或者該屬性是dom/html屬性,則必須處理該屬性。例如 。這裏source綁定到Grid組件的source參數,因爲class只是html,如果你想從java文件中檢索它的值,它需要使用表達式語言。我希望這是有道理的。 看看:http://tapestry.apache.org/property-expressions.html –
joostschouten
2011-06-15 20:26:47
我現在完全理解我的錯誤在哪裏:)非常感謝! – sfrj 2011-06-15 20:36:52