You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Jochen Reinhardt (JIRA)" <de...@myfaces.apache.org> on 2009/03/10 19:32:50 UTC

[jira] Commented: (TOMAHAWK-1400) ArithmeticException when last button is pressed in empty table

    [ https://issues.apache.org/jira/browse/TOMAHAWK-1400?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12680573#action_12680573 ] 

Jochen Reinhardt commented on TOMAHAWK-1400:
--------------------------------------------

Seems to be a layer 8 problem. I did not know that I had to set the rows attribute in the table element to make things work. I was already wondering how to adjust the number of records. I see, that changing the default for rows to something else is not what one expects. But causing an ArithmeticExcpetion in the default configuration is not perfect either.

What I am really missing, is a hint on the instructions section of the JSF tag documentation for DataScroller. That would make life easier for newbies like me.

> ArithmeticException when last button is pressed in empty table
> --------------------------------------------------------------
>
>                 Key: TOMAHAWK-1400
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1400
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Data Scroller
>    Affects Versions: 1.1.8
>         Environment: JBoss 5.01GA with Sun's JSF RI, Ubuntu Linux
>            Reporter: Jochen Reinhardt
>            Priority: Minor
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> Problem is in AbstractHtmlDataScroller.java, line 307 / 308
> int rows = uiData.getRows();
> int delta = rowcount % rows;
> Rows obviously can be 0, so the code should read:
> int rows = uiData.getRows();
> int delta = rows != 0 ? rowcount % rows : 0;

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.