You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Jamie Orchard-Hays <ja...@dang.com> on 2003/10/23 22:54:14 UTC
weird Table Component problem
I was working with BeanTable, our extenstion to the Table component here at
Darden (go Erik!), and came across an error that none of the other
developers was experiencing. I finally stopped the bug by removing
-Dorg.apache.tapestry.disable-caching=true
from my jvm.config file for JRun. I've put the generated error below. It has
to do with the paging mechanism. I was wondering if you might have any first
thoughts about what might be going on. (I haven't taken the time to try to
trace through the code yet, other than looking quickly at SimpleTableModel.)
Here's the error:
org.apache.tapestry.BindingException
Unable to resolve expression 'tableModel.pageCount > 1' for
org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[Corpor
ations/tableView.tableElement].
binding: ExpressionBinding[Corporations/tableView.tableElement
tableModel.pageCount > 1]
location:
classpath:/org/apache/tapestry/contrib/table/components/Table.jwc, line 79
ognl.OgnlException
pageCount
java.lang.ArithmeticException
/ by zero
Stack Trace:
a..
org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPageCount
(SimpleTableModel.java:143)
b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
c..
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
d..
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
Thanks,
Jamie
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: weird Table Component problem
Posted by Jamie Orchard-Hays <ja...@dang.com>.
That's great, Mindbridge.
Regards,
Jamie
----- Original Message -----
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Saturday, October 25, 2003 3:16 AM
Subject: Re: weird Table Component problem
> Hi,
>
> I have checked in a small modification of the Table that lists all data on
> one page if the page size is 0 or negative. This should prevent the error
> you are getting and is a good way to turn off paging, but it seems to me
> that it is not quite what you want.
> I would suggest to carefully check the the rest of the code you use to see
> what could invoke setPageSize(0) and if that is intented.
>
> Best regards,
> -mb
>
> ----- Original Message -----
> From: "Jamie Orchard-Hays" <ja...@dang.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Friday, October 24, 2003 11:40 PM
> Subject: Re: weird Table Component problem
>
>
> > OK, I omitted our BeanTable component.... Problem gone. I'm going to
> > investigate it and see what we're not handling.
> >
> >
> > ----- Original Message -----
> > From: "Erik Hatcher" <er...@ehatchersolutions.com>
> > To: "Tapestry development" <ta...@jakarta.apache.org>
> > Sent: Thursday, October 23, 2003 6:52 PM
> > Subject: Re: weird Table Component problem
> >
> >
> > > Since I won't see you boys until next week.... try using the *pure*
> > > Table component to see if that fixes things. I'm merely winging it
> > > with my wrapper component and could easily have missed doing something
> > > that I should have during the lifecycle since the table model is being
> > > created more dynamically than it would be otherwise.
> > >
> > > When in doubt, eliminate some variables from the equation!
> > >
> > > Erik
> > >
> > >
> > > On Thursday, October 23, 2003, at 06:32 PM, Jamie Orchard-Hays wrote:
> > >
> > > > Thanks. I should add that since my original post, Allen and I both
> > > > observed
> > > > this error again, but with caching on. In my case, I think it
happened
> > > > after
> > > > my session timed out and I wonder if this is related. Allen couldn't
> > > > offer
> > > > any specifics about what he might have done differently at the time.
> > > >
> > > > I was wondering what the effect of changing
> > > >
> > > > if(nRowCount ==0) to
> > > > if(nRowCount < 1) might have.
> > > >
> > > > SimpleTableModel:
> > > >
> > > > public int getPageCount()
> > > > {
> > > > int nRowCount = getRowCount();
> > > > if (nRowCount == 0)
> > > > return 1;
> > > > return (nRowCount - 1) / getPagingState().getPageSize() + 1;
> > > > }
> > > >
> > > > Jamie
> > > > ----- Original Message -----
> > > > From: "Mindbridge" <mi...@yahoo.com>
> > > > To: "Tapestry development" <ta...@jakarta.apache.org>
> > > > Sent: Thursday, October 23, 2003 6:15 PM
> > > > Subject: Re: weird Table Component problem
> > > >
> > > >
> > > >> Hi,
> > > >>
> > > >> Interesting. That occurs because the 'page size' in the table state
> > > >> has
> > > > been
> > > >> set to 0 -- probably an indirect result of other code. It is
> > > >> interesting
> > > >> that this should occur when disable-caching is turned on -- perhaps
> > > >> there
> > > > is
> > > >> a property that is not re-initialized at page detach?
> > > >>
> > > >> This raises an interesting question -- what should the Table do if
> the
> > > > page
> > > >> size is set 0 (or less than 0)? I guess it is logical to place
> > > >> everything
> > > > on
> > > >> one page. I will make a change along those lines soon.
> > > >>
> > > >> -mb
> > > >>
> > > >>
> > > >> ----- Original Message -----
> > > >> From: "Jamie Orchard-Hays" <ja...@dang.com>
> > > >> To: "Tapestry development" <ta...@jakarta.apache.org>
> > > >> Sent: Thursday, October 23, 2003 11:54 PM
> > > >> Subject: weird Table Component problem
> > > >>
> > > >>
> > > >>> I was working with BeanTable, our extenstion to the Table
component
> > > >>> here
> > > >> at
> > > >>> Darden (go Erik!), and came across an error that none of the other
> > > >>> developers was experiencing. I finally stopped the bug by removing
> > > >>>
> > > >>> -Dorg.apache.tapestry.disable-caching=true
> > > >>>
> > > >>> from my jvm.config file for JRun. I've put the generated error
> > > >>> below. It
> > > >> has
> > > >>> to do with the paging mechanism. I was wondering if you might have
> > > >>> any
> > > >> first
> > > >>> thoughts about what might be going on. (I haven't taken the time
to
> > > >>> try
> > > > to
> > > >>> trace through the code yet, other than looking quickly at
> > > >> SimpleTableModel.)
> > > >>>
> > > >>> Here's the error:
> > > >>>
> > > >>> org.apache.tapestry.BindingException
> > > >>> Unable to resolve expression 'tableModel.pageCount > 1' for
> > > >>>
> > > >>
> > > >
> org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[C
> > > > orpor
> > > >>> ations/tableView.tableElement].
> > > >>> binding:
ExpressionBinding[Corporations/tableView.tableElement
> > > >>> tableModel.pageCount > 1]
> > > >>> location:
> > > >>> classpath:/org/apache/tapestry/contrib/table/components/Table.jwc,
> > > >>> line
> > > > 79
> > > >>>
> > > >>> ognl.OgnlException
> > > >>> pageCount
> > > >>>
> > > >>> java.lang.ArithmeticException
> > > >>> / by zero
> > > >>> Stack Trace:
> > > >>> a..
> > > >>>
> > > >>
> > > >
> org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPage
> > > > Count
> > > >>> (SimpleTableModel.java:143)
> > > >>> b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > >>> Method)
> > > >>> c..
> > > >>>
> > > >>
> > > >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> > > > va:39
> > > >>> )
> > > >>> d..
> > > >>>
> > > >>
> > > >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> > > > rImpl
> > > >>>
> > > >>>
> > > >>> Thanks,
> > > >>>
> > > >>> Jamie
> > > >>>
> > > >>>
> > >
> >>> ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail:
tapestry-dev-unsubscribe@jakarta.apache.org
> > > >>> For additional commands, e-mail:
> tapestry-dev-help@jakarta.apache.org
> > > >>
> > > >>
> > >
>> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > >> For additional commands, e-mail:
tapestry-dev-help@jakarta.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
tapestry-dev-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: weird Table Component problem
Posted by Jamie Orchard-Hays <ja...@dang.com>.
Thanks again, Mindbridge. Looks like that has solved our immediate
difficulty. I am hoping to have time tomorrow to poke around for the
setPageSize() invocation.
Jamie
----- Original Message -----
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Saturday, October 25, 2003 3:16 AM
Subject: Re: weird Table Component problem
> Hi,
>
> I have checked in a small modification of the Table that lists all data on
> one page if the page size is 0 or negative. This should prevent the error
> you are getting and is a good way to turn off paging, but it seems to me
> that it is not quite what you want.
> I would suggest to carefully check the the rest of the code you use to see
> what could invoke setPageSize(0) and if that is intented.
>
> Best regards,
> -mb
>
> ----- Original Message -----
> From: "Jamie Orchard-Hays" <ja...@dang.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Friday, October 24, 2003 11:40 PM
> Subject: Re: weird Table Component problem
>
>
> > OK, I omitted our BeanTable component.... Problem gone. I'm going to
> > investigate it and see what we're not handling.
> >
> >
> > ----- Original Message -----
> > From: "Erik Hatcher" <er...@ehatchersolutions.com>
> > To: "Tapestry development" <ta...@jakarta.apache.org>
> > Sent: Thursday, October 23, 2003 6:52 PM
> > Subject: Re: weird Table Component problem
> >
> >
> > > Since I won't see you boys until next week.... try using the *pure*
> > > Table component to see if that fixes things. I'm merely winging it
> > > with my wrapper component and could easily have missed doing something
> > > that I should have during the lifecycle since the table model is being
> > > created more dynamically than it would be otherwise.
> > >
> > > When in doubt, eliminate some variables from the equation!
> > >
> > > Erik
> > >
> > >
> > > On Thursday, October 23, 2003, at 06:32 PM, Jamie Orchard-Hays wrote:
> > >
> > > > Thanks. I should add that since my original post, Allen and I both
> > > > observed
> > > > this error again, but with caching on. In my case, I think it
happened
> > > > after
> > > > my session timed out and I wonder if this is related. Allen couldn't
> > > > offer
> > > > any specifics about what he might have done differently at the time.
> > > >
> > > > I was wondering what the effect of changing
> > > >
> > > > if(nRowCount ==0) to
> > > > if(nRowCount < 1) might have.
> > > >
> > > > SimpleTableModel:
> > > >
> > > > public int getPageCount()
> > > > {
> > > > int nRowCount = getRowCount();
> > > > if (nRowCount == 0)
> > > > return 1;
> > > > return (nRowCount - 1) / getPagingState().getPageSize() + 1;
> > > > }
> > > >
> > > > Jamie
> > > > ----- Original Message -----
> > > > From: "Mindbridge" <mi...@yahoo.com>
> > > > To: "Tapestry development" <ta...@jakarta.apache.org>
> > > > Sent: Thursday, October 23, 2003 6:15 PM
> > > > Subject: Re: weird Table Component problem
> > > >
> > > >
> > > >> Hi,
> > > >>
> > > >> Interesting. That occurs because the 'page size' in the table state
> > > >> has
> > > > been
> > > >> set to 0 -- probably an indirect result of other code. It is
> > > >> interesting
> > > >> that this should occur when disable-caching is turned on -- perhaps
> > > >> there
> > > > is
> > > >> a property that is not re-initialized at page detach?
> > > >>
> > > >> This raises an interesting question -- what should the Table do if
> the
> > > > page
> > > >> size is set 0 (or less than 0)? I guess it is logical to place
> > > >> everything
> > > > on
> > > >> one page. I will make a change along those lines soon.
> > > >>
> > > >> -mb
> > > >>
> > > >>
> > > >> ----- Original Message -----
> > > >> From: "Jamie Orchard-Hays" <ja...@dang.com>
> > > >> To: "Tapestry development" <ta...@jakarta.apache.org>
> > > >> Sent: Thursday, October 23, 2003 11:54 PM
> > > >> Subject: weird Table Component problem
> > > >>
> > > >>
> > > >>> I was working with BeanTable, our extenstion to the Table
component
> > > >>> here
> > > >> at
> > > >>> Darden (go Erik!), and came across an error that none of the other
> > > >>> developers was experiencing. I finally stopped the bug by removing
> > > >>>
> > > >>> -Dorg.apache.tapestry.disable-caching=true
> > > >>>
> > > >>> from my jvm.config file for JRun. I've put the generated error
> > > >>> below. It
> > > >> has
> > > >>> to do with the paging mechanism. I was wondering if you might have
> > > >>> any
> > > >> first
> > > >>> thoughts about what might be going on. (I haven't taken the time
to
> > > >>> try
> > > > to
> > > >>> trace through the code yet, other than looking quickly at
> > > >> SimpleTableModel.)
> > > >>>
> > > >>> Here's the error:
> > > >>>
> > > >>> org.apache.tapestry.BindingException
> > > >>> Unable to resolve expression 'tableModel.pageCount > 1' for
> > > >>>
> > > >>
> > > >
> org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[C
> > > > orpor
> > > >>> ations/tableView.tableElement].
> > > >>> binding:
ExpressionBinding[Corporations/tableView.tableElement
> > > >>> tableModel.pageCount > 1]
> > > >>> location:
> > > >>> classpath:/org/apache/tapestry/contrib/table/components/Table.jwc,
> > > >>> line
> > > > 79
> > > >>>
> > > >>> ognl.OgnlException
> > > >>> pageCount
> > > >>>
> > > >>> java.lang.ArithmeticException
> > > >>> / by zero
> > > >>> Stack Trace:
> > > >>> a..
> > > >>>
> > > >>
> > > >
> org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPage
> > > > Count
> > > >>> (SimpleTableModel.java:143)
> > > >>> b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > > >>> Method)
> > > >>> c..
> > > >>>
> > > >>
> > > >
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> > > > va:39
> > > >>> )
> > > >>> d..
> > > >>>
> > > >>
> > > >
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> > > > rImpl
> > > >>>
> > > >>>
> > > >>> Thanks,
> > > >>>
> > > >>> Jamie
> > > >>>
> > > >>>
> > >
> >>> ---------------------------------------------------------------------
> > > >>> To unsubscribe, e-mail:
tapestry-dev-unsubscribe@jakarta.apache.org
> > > >>> For additional commands, e-mail:
> tapestry-dev-help@jakarta.apache.org
> > > >>
> > > >>
> > >
>> ---------------------------------------------------------------------
> > > >> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > >> For additional commands, e-mail:
tapestry-dev-help@jakarta.apache.org
> > > >>
> > > >>
> > > >
> > > >
> > >
> ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > > For additional commands, e-mail:
tapestry-dev-help@jakarta.apache.org
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: weird Table Component problem
Posted by Mindbridge <mi...@yahoo.com>.
Hi,
I have checked in a small modification of the Table that lists all data on
one page if the page size is 0 or negative. This should prevent the error
you are getting and is a good way to turn off paging, but it seems to me
that it is not quite what you want.
I would suggest to carefully check the the rest of the code you use to see
what could invoke setPageSize(0) and if that is intented.
Best regards,
-mb
----- Original Message -----
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Friday, October 24, 2003 11:40 PM
Subject: Re: weird Table Component problem
> OK, I omitted our BeanTable component.... Problem gone. I'm going to
> investigate it and see what we're not handling.
>
>
> ----- Original Message -----
> From: "Erik Hatcher" <er...@ehatchersolutions.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Thursday, October 23, 2003 6:52 PM
> Subject: Re: weird Table Component problem
>
>
> > Since I won't see you boys until next week.... try using the *pure*
> > Table component to see if that fixes things. I'm merely winging it
> > with my wrapper component and could easily have missed doing something
> > that I should have during the lifecycle since the table model is being
> > created more dynamically than it would be otherwise.
> >
> > When in doubt, eliminate some variables from the equation!
> >
> > Erik
> >
> >
> > On Thursday, October 23, 2003, at 06:32 PM, Jamie Orchard-Hays wrote:
> >
> > > Thanks. I should add that since my original post, Allen and I both
> > > observed
> > > this error again, but with caching on. In my case, I think it happened
> > > after
> > > my session timed out and I wonder if this is related. Allen couldn't
> > > offer
> > > any specifics about what he might have done differently at the time.
> > >
> > > I was wondering what the effect of changing
> > >
> > > if(nRowCount ==0) to
> > > if(nRowCount < 1) might have.
> > >
> > > SimpleTableModel:
> > >
> > > public int getPageCount()
> > > {
> > > int nRowCount = getRowCount();
> > > if (nRowCount == 0)
> > > return 1;
> > > return (nRowCount - 1) / getPagingState().getPageSize() + 1;
> > > }
> > >
> > > Jamie
> > > ----- Original Message -----
> > > From: "Mindbridge" <mi...@yahoo.com>
> > > To: "Tapestry development" <ta...@jakarta.apache.org>
> > > Sent: Thursday, October 23, 2003 6:15 PM
> > > Subject: Re: weird Table Component problem
> > >
> > >
> > >> Hi,
> > >>
> > >> Interesting. That occurs because the 'page size' in the table state
> > >> has
> > > been
> > >> set to 0 -- probably an indirect result of other code. It is
> > >> interesting
> > >> that this should occur when disable-caching is turned on -- perhaps
> > >> there
> > > is
> > >> a property that is not re-initialized at page detach?
> > >>
> > >> This raises an interesting question -- what should the Table do if
the
> > > page
> > >> size is set 0 (or less than 0)? I guess it is logical to place
> > >> everything
> > > on
> > >> one page. I will make a change along those lines soon.
> > >>
> > >> -mb
> > >>
> > >>
> > >> ----- Original Message -----
> > >> From: "Jamie Orchard-Hays" <ja...@dang.com>
> > >> To: "Tapestry development" <ta...@jakarta.apache.org>
> > >> Sent: Thursday, October 23, 2003 11:54 PM
> > >> Subject: weird Table Component problem
> > >>
> > >>
> > >>> I was working with BeanTable, our extenstion to the Table component
> > >>> here
> > >> at
> > >>> Darden (go Erik!), and came across an error that none of the other
> > >>> developers was experiencing. I finally stopped the bug by removing
> > >>>
> > >>> -Dorg.apache.tapestry.disable-caching=true
> > >>>
> > >>> from my jvm.config file for JRun. I've put the generated error
> > >>> below. It
> > >> has
> > >>> to do with the paging mechanism. I was wondering if you might have
> > >>> any
> > >> first
> > >>> thoughts about what might be going on. (I haven't taken the time to
> > >>> try
> > > to
> > >>> trace through the code yet, other than looking quickly at
> > >> SimpleTableModel.)
> > >>>
> > >>> Here's the error:
> > >>>
> > >>> org.apache.tapestry.BindingException
> > >>> Unable to resolve expression 'tableModel.pageCount > 1' for
> > >>>
> > >>
> > >
org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[C
> > > orpor
> > >>> ations/tableView.tableElement].
> > >>> binding: ExpressionBinding[Corporations/tableView.tableElement
> > >>> tableModel.pageCount > 1]
> > >>> location:
> > >>> classpath:/org/apache/tapestry/contrib/table/components/Table.jwc,
> > >>> line
> > > 79
> > >>>
> > >>> ognl.OgnlException
> > >>> pageCount
> > >>>
> > >>> java.lang.ArithmeticException
> > >>> / by zero
> > >>> Stack Trace:
> > >>> a..
> > >>>
> > >>
> > >
org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPage
> > > Count
> > >>> (SimpleTableModel.java:143)
> > >>> b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > >>> Method)
> > >>> c..
> > >>>
> > >>
> > >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> > > va:39
> > >>> )
> > >>> d..
> > >>>
> > >>
> > >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> > > rImpl
> > >>>
> > >>>
> > >>> Thanks,
> > >>>
> > >>> Jamie
> > >>>
> > >>>
> >
>>> ---------------------------------------------------------------------
> > >>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > >>> For additional commands, e-mail:
tapestry-dev-help@jakarta.apache.org
> > >>
> > >>
> > >> ---------------------------------------------------------------------
> > >> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > >> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> > >>
> > >>
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: weird Table Component problem
Posted by Jamie Orchard-Hays <ja...@dang.com>.
OK, I omitted our BeanTable component.... Problem gone. I'm going to
investigate it and see what we're not handling.
----- Original Message -----
From: "Erik Hatcher" <er...@ehatchersolutions.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Thursday, October 23, 2003 6:52 PM
Subject: Re: weird Table Component problem
> Since I won't see you boys until next week.... try using the *pure*
> Table component to see if that fixes things. I'm merely winging it
> with my wrapper component and could easily have missed doing something
> that I should have during the lifecycle since the table model is being
> created more dynamically than it would be otherwise.
>
> When in doubt, eliminate some variables from the equation!
>
> Erik
>
>
> On Thursday, October 23, 2003, at 06:32 PM, Jamie Orchard-Hays wrote:
>
> > Thanks. I should add that since my original post, Allen and I both
> > observed
> > this error again, but with caching on. In my case, I think it happened
> > after
> > my session timed out and I wonder if this is related. Allen couldn't
> > offer
> > any specifics about what he might have done differently at the time.
> >
> > I was wondering what the effect of changing
> >
> > if(nRowCount ==0) to
> > if(nRowCount < 1) might have.
> >
> > SimpleTableModel:
> >
> > public int getPageCount()
> > {
> > int nRowCount = getRowCount();
> > if (nRowCount == 0)
> > return 1;
> > return (nRowCount - 1) / getPagingState().getPageSize() + 1;
> > }
> >
> > Jamie
> > ----- Original Message -----
> > From: "Mindbridge" <mi...@yahoo.com>
> > To: "Tapestry development" <ta...@jakarta.apache.org>
> > Sent: Thursday, October 23, 2003 6:15 PM
> > Subject: Re: weird Table Component problem
> >
> >
> >> Hi,
> >>
> >> Interesting. That occurs because the 'page size' in the table state
> >> has
> > been
> >> set to 0 -- probably an indirect result of other code. It is
> >> interesting
> >> that this should occur when disable-caching is turned on -- perhaps
> >> there
> > is
> >> a property that is not re-initialized at page detach?
> >>
> >> This raises an interesting question -- what should the Table do if the
> > page
> >> size is set 0 (or less than 0)? I guess it is logical to place
> >> everything
> > on
> >> one page. I will make a change along those lines soon.
> >>
> >> -mb
> >>
> >>
> >> ----- Original Message -----
> >> From: "Jamie Orchard-Hays" <ja...@dang.com>
> >> To: "Tapestry development" <ta...@jakarta.apache.org>
> >> Sent: Thursday, October 23, 2003 11:54 PM
> >> Subject: weird Table Component problem
> >>
> >>
> >>> I was working with BeanTable, our extenstion to the Table component
> >>> here
> >> at
> >>> Darden (go Erik!), and came across an error that none of the other
> >>> developers was experiencing. I finally stopped the bug by removing
> >>>
> >>> -Dorg.apache.tapestry.disable-caching=true
> >>>
> >>> from my jvm.config file for JRun. I've put the generated error
> >>> below. It
> >> has
> >>> to do with the paging mechanism. I was wondering if you might have
> >>> any
> >> first
> >>> thoughts about what might be going on. (I haven't taken the time to
> >>> try
> > to
> >>> trace through the code yet, other than looking quickly at
> >> SimpleTableModel.)
> >>>
> >>> Here's the error:
> >>>
> >>> org.apache.tapestry.BindingException
> >>> Unable to resolve expression 'tableModel.pageCount > 1' for
> >>>
> >>
> > org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[C
> > orpor
> >>> ations/tableView.tableElement].
> >>> binding: ExpressionBinding[Corporations/tableView.tableElement
> >>> tableModel.pageCount > 1]
> >>> location:
> >>> classpath:/org/apache/tapestry/contrib/table/components/Table.jwc,
> >>> line
> > 79
> >>>
> >>> ognl.OgnlException
> >>> pageCount
> >>>
> >>> java.lang.ArithmeticException
> >>> / by zero
> >>> Stack Trace:
> >>> a..
> >>>
> >>
> > org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPage
> > Count
> >>> (SimpleTableModel.java:143)
> >>> b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> >>> Method)
> >>> c..
> >>>
> >>
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> > va:39
> >>> )
> >>> d..
> >>>
> >>
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> > rImpl
> >>>
> >>>
> >>> Thanks,
> >>>
> >>> Jamie
> >>>
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> >> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
> >>
> >>
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: weird Table Component problem
Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Since I won't see you boys until next week.... try using the *pure*
Table component to see if that fixes things. I'm merely winging it
with my wrapper component and could easily have missed doing something
that I should have during the lifecycle since the table model is being
created more dynamically than it would be otherwise.
When in doubt, eliminate some variables from the equation!
Erik
On Thursday, October 23, 2003, at 06:32 PM, Jamie Orchard-Hays wrote:
> Thanks. I should add that since my original post, Allen and I both
> observed
> this error again, but with caching on. In my case, I think it happened
> after
> my session timed out and I wonder if this is related. Allen couldn't
> offer
> any specifics about what he might have done differently at the time.
>
> I was wondering what the effect of changing
>
> if(nRowCount ==0) to
> if(nRowCount < 1) might have.
>
> SimpleTableModel:
>
> public int getPageCount()
> {
> int nRowCount = getRowCount();
> if (nRowCount == 0)
> return 1;
> return (nRowCount - 1) / getPagingState().getPageSize() + 1;
> }
>
> Jamie
> ----- Original Message -----
> From: "Mindbridge" <mi...@yahoo.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Thursday, October 23, 2003 6:15 PM
> Subject: Re: weird Table Component problem
>
>
>> Hi,
>>
>> Interesting. That occurs because the 'page size' in the table state
>> has
> been
>> set to 0 -- probably an indirect result of other code. It is
>> interesting
>> that this should occur when disable-caching is turned on -- perhaps
>> there
> is
>> a property that is not re-initialized at page detach?
>>
>> This raises an interesting question -- what should the Table do if the
> page
>> size is set 0 (or less than 0)? I guess it is logical to place
>> everything
> on
>> one page. I will make a change along those lines soon.
>>
>> -mb
>>
>>
>> ----- Original Message -----
>> From: "Jamie Orchard-Hays" <ja...@dang.com>
>> To: "Tapestry development" <ta...@jakarta.apache.org>
>> Sent: Thursday, October 23, 2003 11:54 PM
>> Subject: weird Table Component problem
>>
>>
>>> I was working with BeanTable, our extenstion to the Table component
>>> here
>> at
>>> Darden (go Erik!), and came across an error that none of the other
>>> developers was experiencing. I finally stopped the bug by removing
>>>
>>> -Dorg.apache.tapestry.disable-caching=true
>>>
>>> from my jvm.config file for JRun. I've put the generated error
>>> below. It
>> has
>>> to do with the paging mechanism. I was wondering if you might have
>>> any
>> first
>>> thoughts about what might be going on. (I haven't taken the time to
>>> try
> to
>>> trace through the code yet, other than looking quickly at
>> SimpleTableModel.)
>>>
>>> Here's the error:
>>>
>>> org.apache.tapestry.BindingException
>>> Unable to resolve expression 'tableModel.pageCount > 1' for
>>>
>>
> org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[C
> orpor
>>> ations/tableView.tableElement].
>>> binding: ExpressionBinding[Corporations/tableView.tableElement
>>> tableModel.pageCount > 1]
>>> location:
>>> classpath:/org/apache/tapestry/contrib/table/components/Table.jwc,
>>> line
> 79
>>>
>>> ognl.OgnlException
>>> pageCount
>>>
>>> java.lang.ArithmeticException
>>> / by zero
>>> Stack Trace:
>>> a..
>>>
>>
> org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPage
> Count
>>> (SimpleTableModel.java:143)
>>> b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>> Method)
>>> c..
>>>
>>
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.ja
> va:39
>>> )
>>> d..
>>>
>>
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccesso
> rImpl
>>>
>>>
>>> Thanks,
>>>
>>> Jamie
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: weird Table Component problem
Posted by Jamie Orchard-Hays <ja...@dang.com>.
Thanks. I should add that since my original post, Allen and I both observed
this error again, but with caching on. In my case, I think it happened after
my session timed out and I wonder if this is related. Allen couldn't offer
any specifics about what he might have done differently at the time.
I was wondering what the effect of changing
if(nRowCount ==0) to
if(nRowCount < 1) might have.
SimpleTableModel:
public int getPageCount()
{
int nRowCount = getRowCount();
if (nRowCount == 0)
return 1;
return (nRowCount - 1) / getPagingState().getPageSize() + 1;
}
Jamie
----- Original Message -----
From: "Mindbridge" <mi...@yahoo.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Thursday, October 23, 2003 6:15 PM
Subject: Re: weird Table Component problem
> Hi,
>
> Interesting. That occurs because the 'page size' in the table state has
been
> set to 0 -- probably an indirect result of other code. It is interesting
> that this should occur when disable-caching is turned on -- perhaps there
is
> a property that is not re-initialized at page detach?
>
> This raises an interesting question -- what should the Table do if the
page
> size is set 0 (or less than 0)? I guess it is logical to place everything
on
> one page. I will make a change along those lines soon.
>
> -mb
>
>
> ----- Original Message -----
> From: "Jamie Orchard-Hays" <ja...@dang.com>
> To: "Tapestry development" <ta...@jakarta.apache.org>
> Sent: Thursday, October 23, 2003 11:54 PM
> Subject: weird Table Component problem
>
>
> > I was working with BeanTable, our extenstion to the Table component here
> at
> > Darden (go Erik!), and came across an error that none of the other
> > developers was experiencing. I finally stopped the bug by removing
> >
> > -Dorg.apache.tapestry.disable-caching=true
> >
> > from my jvm.config file for JRun. I've put the generated error below. It
> has
> > to do with the paging mechanism. I was wondering if you might have any
> first
> > thoughts about what might be going on. (I haven't taken the time to try
to
> > trace through the code yet, other than looking quickly at
> SimpleTableModel.)
> >
> > Here's the error:
> >
> > org.apache.tapestry.BindingException
> > Unable to resolve expression 'tableModel.pageCount > 1' for
> >
>
org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[Corpor
> > ations/tableView.tableElement].
> > binding: ExpressionBinding[Corporations/tableView.tableElement
> > tableModel.pageCount > 1]
> > location:
> > classpath:/org/apache/tapestry/contrib/table/components/Table.jwc, line
79
> >
> > ognl.OgnlException
> > pageCount
> >
> > java.lang.ArithmeticException
> > / by zero
> > Stack Trace:
> > a..
> >
>
org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPageCount
> > (SimpleTableModel.java:143)
> > b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > c..
> >
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> > d..
> >
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> >
> >
> > Thanks,
> >
> > Jamie
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
Re: weird Table Component problem
Posted by Mindbridge <mi...@yahoo.com>.
Hi,
Interesting. That occurs because the 'page size' in the table state has been
set to 0 -- probably an indirect result of other code. It is interesting
that this should occur when disable-caching is turned on -- perhaps there is
a property that is not re-initialized at page detach?
This raises an interesting question -- what should the Table do if the page
size is set 0 (or less than 0)? I guess it is logical to place everything on
one page. I will make a change along those lines soon.
-mb
----- Original Message -----
From: "Jamie Orchard-Hays" <ja...@dang.com>
To: "Tapestry development" <ta...@jakarta.apache.org>
Sent: Thursday, October 23, 2003 11:54 PM
Subject: weird Table Component problem
> I was working with BeanTable, our extenstion to the Table component here
at
> Darden (go Erik!), and came across an error that none of the other
> developers was experiencing. I finally stopped the bug by removing
>
> -Dorg.apache.tapestry.disable-caching=true
>
> from my jvm.config file for JRun. I've put the generated error below. It
has
> to do with the paging mechanism. I was wondering if you might have any
first
> thoughts about what might be going on. (I haven't taken the time to try to
> trace through the code yet, other than looking quickly at
SimpleTableModel.)
>
> Here's the error:
>
> org.apache.tapestry.BindingException
> Unable to resolve expression 'tableModel.pageCount > 1' for
>
org.apache.tapestry.contrib.table.components.Table$Enhance_52@15075f9[Corpor
> ations/tableView.tableElement].
> binding: ExpressionBinding[Corporations/tableView.tableElement
> tableModel.pageCount > 1]
> location:
> classpath:/org/apache/tapestry/contrib/table/components/Table.jwc, line 79
>
> ognl.OgnlException
> pageCount
>
> java.lang.ArithmeticException
> / by zero
> Stack Trace:
> a..
>
org.apache.tapestry.contrib.table.model.simple.SimpleTableModel.getPageCount
> (SimpleTableModel.java:143)
> b.. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> c..
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> )
> d..
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
>
>
> Thanks,
>
> Jamie
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org