I had a problem like this on where i was passing the data to the table though a binding in the component. The problem I had was that the binding was set to "in" i fixed it by setting the binding to "auto". I think it was the table could not ask for the data.

From: "Mind Bridge" <[EMAIL PROTECTED]>
Reply-To: "Tapestry users" <[email protected]>
To: "Tapestry users" <[email protected]>,"Tim Downey" <[EMAIL PROTECTED]>
Subject: Re: Exception when sorting Table component
Date: Thu, 28 Apr 2005 23:37:58 +0300


I guess that you initialize source or columns in pageBeginRender and they
are null until then.
Since the Direct listeners are invoked before pageBeginRender, Table gets
the nulls and you get the described exception.

Could you make getSource()/getColumns() to initialize lazily instead?
(initialize if saved value is null, otherwise just return it) That should
resolve this problem.

-mb


----- Original Message ----- From: "Tim Downey" <[EMAIL PROTECTED]> To: <[email protected]> Sent: Thursday, April 28, 2005 10:32 PM Subject: Exception when sorting Table component


Hi,

I'm receiving an ApplicationRuntimeException whenever I attempt to
sort a Table component.  The initial load of the Table component is
fine, but any attempts to sort cause the ApplicationRuntimeException
with this message:

"Either the tableModel parameter or both source and columns parameters
must be specified by component
CompPlannerHome/directReports.directReportsTable.tableView"

The offending Table component is embedded in a custom tab component
that I am building.  So long as the Table was directly embedded in a
Page, I have not had a problem.  I can't seem to sort out what the
difference is.

I have attempted to step through the debugger to sort out what is
going on.  Here's a synopsis of what I've seen.  Hopefully someone can
shed some light.

After clicking the column header to trigger the sort, I stepped
through the listener cycle.  Throughout the listener cycle, the
TableModel is non-null and available.  After the listener cycle,
during the render cycle on my custom tab component, it is null.  In
fact, none of the bindings for my custom tab component have been set
yet.  I'm not really sure why this is.

As I mentioned, it works fine on the initial request.  Requests to
change the sort seem to causes the problem.

Also, the call to pageBeginRender on my custom tab component that
happens just prior to the renderComponent on the Table is able to
see/access the table model for the contained Table component.

Here's a stack trace.  I hope someone can help.  I've been struggling
with this for two days....

----------------------------------------------------------------------------
------------------------------------------------------
Either the tableModel parameter or both source and columns parameters
must be specified by component
CompPlannerHome/directReports.directReportsTable.tableView
Stack Trace:

org.apache.tapestry.contrib.table.components.TableView.getTableModel(TableVi
ew.java:199)
org.apache.tapestry.contrib.table.components.TableView.validateValues(TableV
iew.java:439)
org.apache.tapestry.contrib.table.components.TableView.renderComponent(Table
View.java:471)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
com.workscape.comp.web.component.secure.component.ProtectedComponent.renderC
omponent(ProtectedComponent.java:44)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.components.Delegator.renderComponent(Delegator.java:45)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
org.apache.tapestry.components.RenderBody.renderComponent(RenderBody.java:45
)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
org.apache.tapestry.html.Body.renderComponent(Body.java:269)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractComponent.renderBody(AbstractComponent.java:624)
org.apache.tapestry.html.Shell.renderComponent(Shell.java:124)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
com.workscape.comp.web.component.secure.component.ProtectedComponent.renderC
omponent(ProtectedComponent.java:44)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.BaseComponent.renderComponent(BaseComponent.java:118)
org.apache.tapestry.AbstractComponent.render(AbstractComponent.java:857)
org.apache.tapestry.AbstractPage.renderPage(AbstractPage.java:300)
com.workscape.comp.web.component.secure.component.page.ProtectedPage.renderP
age(ProtectedPage.java:71)
org.apache.tapestry.engine.RequestCycle.renderPage(RequestCycle.java:368)
org.apache.tapestry.engine.AbstractEngine.renderResponse(AbstractEngine.java
:732)
org.apache.tapestry.engine.DirectService.service(DirectService.java:174)
org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:872)
org.apache.tapestry.ApplicationServlet.doService(ApplicationServlet.java:197
)
com.workscape.comp.service.web.CPServlet.doService(CPServlet.java:65)
org.apache.tapestry.ApplicationServlet.doGet(ApplicationServlet.java:158)
javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(Servle
tStubImpl.java:971)
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:402)
weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:28)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
com.workscape.directory.v1.interceptor.securty.AuthFilter$1.run(AuthFilter.j
ava:187)
java.security.AccessController.doPrivileged(Native Method)
javax.security.auth.Subject.doAs(Subject.java:379)
com.workscape.directory.v1.interceptor.securty.AuthFilter.doFilter(AuthFilte
r.java:183)
sun.reflect.GeneratedMethodAccessor197.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
java.lang.reflect.Method.invoke(Method.java:324)
com.workscape.directory.v1.interceptor.ServiceInterceptor.invoke(ServiceInte
rceptor.java:131)
com.workscape.directory.v1.interceptor.stddb.STDDBInterceptor.invoke(STDDBIn
terceptor.java:70)
com.workscape.directory.v1.interceptor.session.HTTPSessionInterceptor.invoke
(HTTPSessionInterceptor.java:62)
com.workscape.directory.v1.interceptor.hibernate3.SessionInterceptor.invoke(
SessionInterceptor.java:58)
com.workscape.directory.v1.interceptor.tracer.ConnectionLeakDetectionTracer.
invokeInternal(ConnectionLeakDetectionTracer.java:113)
com.workscape.directory.v1.interceptor.tracer.BaseTracer.invoke(BaseTracer.j
ava:80)
com.workscape.directory.v1.interceptor.ServiceInterceptor.invoke(ServiceInte
rceptor.java:104)
$Proxy20.doFilter(Unknown Source)
com.workscape.directory.v1.interceptor.http.HTTPInterceptor.doFilter(HTTPInt
erceptor.java:79)
weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:27)
weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(W
ebAppServletContext.java:6356)
weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubjec
t.java:317)
weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:3635)
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:2585)
weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

---------------------------------------------------------------------
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]


_________________________________________________________________
SEEK: Over 80,000 jobs across all industries at Australia's #1 job site. http://ninemsn.seek.com.au?hotmail



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to