{"action":"created","issue":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/390","labels_url":"https://api.github.com/repos/primefaces/primefaces/issues/390/labels{/name}","comments_url":"https://api.github.com/repos/primefaces/primefaces/issues/390/comments","events_url":"https://api.github.com/repos/primefaces/primefaces/issues/390/events","html_url":"https://github.com/primefaces/primefaces/issues/390","id":83562980,"number":390,"title":"Lazy DataScollerRenderer loads data twice","user":{"login":"nunofaria11","id":2145649,"avatar_url":"https://avatars.githubusercontent.com/u/2145649?v=3","gravatar_id":"","url":"https://api.github.com/users/nunofaria11","html_url":"https://github.com/nunofaria11","followers_url":"https://api.github.com/users/nunofaria11/followers","following_url":"https://api.github.com/users/nunofaria11/following{/other_user}","gists_url":"https://api.github.com/users/nunofaria11/gists{/gist_id}","starred_url":"https://api.github.com/users/nunofaria11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nunofaria11/subscriptions","organizations_url":"https://api.github.com/users/nunofaria11/orgs","repos_url":"https://api.github.com/users/nunofaria11/repos","events_url":"https://api.github.com/users/nunofaria11/events{/privacy}","received_events_url":"https://api.github.com/users/nunofaria11/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/primefaces/primefaces/labels/5.1.19","name":"5.1.19","color":"ffffff"},{"url":"https://api.github.com/repos/primefaces/primefaces/labels/5.2.6","name":"5.2.6","color":"ffffff"},{"url":"https://api.github.com/repos/primefaces/primefaces/labels/defect","name":"defect","color":"fc2929"}],"state":"closed","locked":false,"assignee":{"login":"cagataycivici","id":686247,"avatar_url":"https://avatars.githubusercontent.com/u/686247?v=3","gravatar_id":"","url":"https://api.github.com/users/cagataycivici","html_url":"https://github.com/cagataycivici","followers_url":"https://api.github.com/users/cagataycivici/followers","following_url":"https://api.github.com/users/cagataycivici/following{/other_user}","gists_url":"https://api.github.com/users/cagataycivici/gists{/gist_id}","starred_url":"https://api.github.com/users/cagataycivici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cagataycivici/subscriptions","organizations_url":"https://api.github.com/users/cagataycivici/orgs","repos_url":"https://api.github.com/users/cagataycivici/repos","events_url":"https://api.github.com/users/cagataycivici/events{/privacy}","received_events_url":"https://api.github.com/users/cagataycivici/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/primefaces/primefaces/milestones/2","html_url":"https://github.com/primefaces/primefaces/milestones/5.3","labels_url":"https://api.github.com/repos/primefaces/primefaces/milestones/2/labels","id":1063690,"number":2,"title":"5.3","description":"","creator":{"login":"cagataycivici","id":686247,"avatar_url":"https://avatars.githubusercontent.com/u/686247?v=3","gravatar_id":"","url":"https://api.github.com/users/cagataycivici","html_url":"https://github.com/cagataycivici","followers_url":"https://api.github.com/users/cagataycivici/followers","following_url":"https://api.github.com/users/cagataycivici/following{/other_user}","gists_url":"https://api.github.com/users/cagataycivici/gists{/gist_id}","starred_url":"https://api.github.com/users/cagataycivici/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cagataycivici/subscriptions","organizations_url":"https://api.github.com/users/cagataycivici/orgs","repos_url":"https://api.github.com/users/cagataycivici/repos","events_url":"https://api.github.com/users/cagataycivici/events{/privacy}","received_events_url":"https://api.github.com/users/cagataycivici/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":237,"state":"open","created_at":"2015-04-12T11:21:46Z","updated_at":"2015-10-15T20:57:53Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-06-01T15:32:10Z","updated_at":"2015-10-16T20:15:46Z","closed_at":"2015-06-04T09:13:38Z","body":"The current **lazy** `DataScrollerRenderer` implementation loads data twice in its `encodeMarkup` method. Suggested correction:\r\n\r\n\tpublic class DataScrollerRenderer extends CoreRenderer {\r\n\r\n\t    protected void encodeMarkup(FacesContext context, DataScroller ds, int chunkSize) throws IOException {\r\n\t        // ... \r\n\t        boolean alreadyLoaded = false;\r\n\t        if (ds.isLazy()) {            \r\n\t            alreadyLoaded = true;\r\n\t            loadLazyData(ds, 0, chunkSize);\r\n\t        }\r\n\t        // ... \r\n\t        loadChunk(context, ds, 0, chunkSize, alreadyLoaded);\r\n\t        // ... \r\n\t    }\r\n\r\n\t    protected void loadChunk(FacesContext context, DataScroller ds, int start, int size) throws IOException {\r\n\t        loadChunk(context, ds, start, size, false);\r\n\t    }\r\n\r\n\t    private void loadChunk(FacesContext context, DataScroller ds, int start, int size, boolean alreadyLoaded) throws IOException {\r\n\t        // ... \r\n\t        if (ds.isLazy() && !alreadyLoaded) {\r\n\t            loadLazyData(ds, start, size);\r\n\t        }\r\n\t        // ... \r\n\t    }\r\n\r\n\t}\r\n\r\nSO post: http://stackoverflow.com/q/29303228/691916"},"comment":{"url":"https://api.github.com/repos/primefaces/primefaces/issues/comments/148822881","html_url":"https://github.com/primefaces/primefaces/issues/390#issuecomment-148822881","issue_url":"https://api.github.com/repos/primefaces/primefaces/issues/390","id":148822881,"user":{"login":"Dsleeper","id":15163537,"avatar_url":"https://avatars.githubusercontent.com/u/15163537?v=3","gravatar_id":"","url":"https://api.github.com/users/Dsleeper","html_url":"https://github.com/Dsleeper","followers_url":"https://api.github.com/users/Dsleeper/followers","following_url":"https://api.github.com/users/Dsleeper/following{/other_user}","gists_url":"https://api.github.com/users/Dsleeper/gists{/gist_id}","starred_url":"https://api.github.com/users/Dsleeper/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dsleeper/subscriptions","organizations_url":"https://api.github.com/users/Dsleeper/orgs","repos_url":"https://api.github.com/users/Dsleeper/repos","events_url":"https://api.github.com/users/Dsleeper/events{/privacy}","received_events_url":"https://api.github.com/users/Dsleeper/received_events","type":"User","site_admin":false},"created_at":"2015-10-16T20:15:46Z","updated_at":"2015-10-16T20:15:46Z","body":"Is this confirmed as fixed? I am still having this issue with 5.3.RC2"}}