ICEfaces
  1. ICEfaces
  2. ICE-3380

PanelSeriesRenderer accesses beyond specified rows

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.2, 1.7, 1.7.1
    • Fix Version/s: 1.7.2
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All

      Description

      When applications use a paged (lazy loading) data model, they don't want UIData containers to access rows outside of the current page. There's a recommendation on a code change to stay within the current page.

        Activity

        Hide
        Tyler Johnson added a comment -

        The paging.zip file attached contains four files which create the problem. The files modify the component showcase for 1.7.1 and can be installed by doing the following.

        1) unzip icefaces src distribution to c:\
        2) unzip the attached paging.zip file to c:\ which will overlay two files and add two additional files
        3) build the src distribution
        4) I deploy to jboss 4.0.5 so I do the following

        • go to component showcase facelets directory
        • ant common.clean
        • ant jboss4.0
        • copy the war file created to jboss deploy directory and start jboss

        The files attached modify the Table - Row Selection example and change it to use the paging DataModel. A click of any row in the table causes the following to display in standard out for jboss:

        14:25:38,824 INFO [STDOUT] fetch page entered
        14:25:38,834 INFO [STDOUT] fetch page entered
        14:25:38,834 INFO [STDOUT] fetch page entered
        14:25:38,834 INFO [STDOUT] fetch page entered
        14:25:38,834 INFO [STDOUT] fetch page entered
        14:25:38,834 INFO [STDOUT] fetch page entered
        14:25:38,834 INFO [STDOUT] fetch page entered
        14:25:38,844 INFO [STDOUT] fetch page entered
        14:25:38,844 INFO [STDOUT] fetch page entered
        14:25:38,844 INFO [STDOUT] fetch page entered
        14:25:38,844 INFO [STDOUT] fetch page entered
        14:25:38,844 INFO [STDOUT] Select handler entered

        I'm hoping the enhancement will eliminate the additional fetch page calls and simply cause only the select handler to fire.

        Show
        Tyler Johnson added a comment - The paging.zip file attached contains four files which create the problem. The files modify the component showcase for 1.7.1 and can be installed by doing the following. 1) unzip icefaces src distribution to c:\ 2) unzip the attached paging.zip file to c:\ which will overlay two files and add two additional files 3) build the src distribution 4) I deploy to jboss 4.0.5 so I do the following go to component showcase facelets directory ant common.clean ant jboss4.0 copy the war file created to jboss deploy directory and start jboss The files attached modify the Table - Row Selection example and change it to use the paging DataModel. A click of any row in the table causes the following to display in standard out for jboss: 14:25:38,824 INFO [STDOUT] fetch page entered 14:25:38,834 INFO [STDOUT] fetch page entered 14:25:38,834 INFO [STDOUT] fetch page entered 14:25:38,834 INFO [STDOUT] fetch page entered 14:25:38,834 INFO [STDOUT] fetch page entered 14:25:38,834 INFO [STDOUT] fetch page entered 14:25:38,834 INFO [STDOUT] fetch page entered 14:25:38,844 INFO [STDOUT] fetch page entered 14:25:38,844 INFO [STDOUT] fetch page entered 14:25:38,844 INFO [STDOUT] fetch page entered 14:25:38,844 INFO [STDOUT] fetch page entered 14:25:38,844 INFO [STDOUT] Select handler entered I'm hoping the enhancement will eliminate the additional fetch page calls and simply cause only the select handler to fire.
        Hide
        Mark Collette added a comment -

        For this to work properly, change the first argument for getEmployees from 5 to 50.

        public class RowSelectController {
        protected void init()

        { // build employee list form employee service. employees = employeeService.getEmployees(50, true, Employee.DEPARTMENT_NAME_COLUMN); }

        }

        Show
        Mark Collette added a comment - For this to work properly, change the first argument for getEmployees from 5 to 50. public class RowSelectController { protected void init() { // build employee list form employee service. employees = employeeService.getEmployees(50, true, Employee.DEPARTMENT_NAME_COLUMN); } }
        Hide
        Mark Collette added a comment -

        I'm pulling the fix for the RowSelector issue into Jira ICE-3440, while leaving this Jira for the original issue, which was PanelSeriesRenderer.

        Show
        Mark Collette added a comment - I'm pulling the fix for the RowSelector issue into Jira ICE-3440 , while leaving this Jira for the original issue, which was PanelSeriesRenderer.
        Hide
        Mark Collette added a comment -

        Reviewed, and used the forum posting suggestion for the change to PanelSeriesRenderer, so it won't access beyond the current page by accessing one row beyond necessary.

        TRUNK
        Subversion 17408
        ICEfaces .17 branch
        Subversion 17409
        icefaces\component\src\com\icesoft\faces\component\panelseries\PanelSeriesRenderer.java

        Show
        Mark Collette added a comment - Reviewed, and used the forum posting suggestion for the change to PanelSeriesRenderer, so it won't access beyond the current page by accessing one row beyond necessary. TRUNK Subversion 17408 ICEfaces .17 branch Subversion 17409 icefaces\component\src\com\icesoft\faces\component\panelseries\PanelSeriesRenderer.java
        Hide
        Isuru Perera added a comment -

        The fix is causing problems for PanelSeries components without paginator.

        Please refer my forum post http://www.icefaces.org/JForum/posts/list/8234.page#39825

        Show
        Isuru Perera added a comment - The fix is causing problems for PanelSeries components without paginator. Please refer my forum post http://www.icefaces.org/JForum/posts/list/8234.page#39825
        Hide
        Mark Collette added a comment -

        Thanks for the head's up Isuru. It's not really about using a dataPaginator or not, since I tested both scenarios, but about not specifying the "rows" attribute on the PanelSeries, which defaults to zero. Now that case is covered too.

        TRUNK
        Subversion 17435
        ICEfaces 1.7 branch
        Subversion 17436
        icefaces\component\src\com\icesoft\faces\component\panelseries\PanelSeriesRenderer.java

        Show
        Mark Collette added a comment - Thanks for the head's up Isuru. It's not really about using a dataPaginator or not, since I tested both scenarios, but about not specifying the "rows" attribute on the PanelSeries, which defaults to zero. Now that case is covered too. TRUNK Subversion 17435 ICEfaces 1.7 branch Subversion 17436 icefaces\component\src\com\icesoft\faces\component\panelseries\PanelSeriesRenderer.java
        Hide
        Isuru Perera added a comment -

        Hi Mark,

        You are welcome..

        I mentioned about dataPaginators as my application doesn't use any paginators with PanelSeries. I just wanted to explain that there was an issue when "rows" attribute is zero..

        Anyway, Thank you very much...

        Show
        Isuru Perera added a comment - Hi Mark, You are welcome.. I mentioned about dataPaginators as my application doesn't use any paginators with PanelSeries. I just wanted to explain that there was an issue when "rows" attribute is zero.. Anyway, Thank you very much...
        Hide
        Bill Blessing added a comment -

        Build of icefaces jar files helped but there is still a problem when using dataPaginator in conjunction with row selection. The test case has been updated to include paging in the row selection example provided by the component showcase.

        Show
        Bill Blessing added a comment - Build of icefaces jar files helped but there is still a problem when using dataPaginator in conjunction with row selection. The test case has been updated to include paging in the row selection example provided by the component showcase.

          People

          • Assignee:
            Unassigned
            Reporter:
            Mark Collette
          • Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: