[ http://issues.apache.org/jira/browse/TOMAHAWK-764?page=comments#action_12446343 ] Martin Marinschek commented on TOMAHAWK-764: --------------------------------------------
Your b) suggestion is the only that would work, but JSF never does this - so I'd not be very comfortable with this solution. The only values which ever get updated are those bound to the "value"-attribute of a component. Why do you bind the first attribute to your backing-beans at all? Why is the data-scroller not allowed to set the first-attribute as it is supposed to do? Why is that not working with AJAX? Well, in fact, what kind of AJAX-solution are you using? There's been a problem with the PPRpanelGroup I have fixed recently which would have caused the restore-state to get lost on post-back. As for me, I don't see why the data-scroller should ever loose control over the first-attribute as soon as it has been used the first time (and until then, it doesn't overwrite the first-attribute). regards, Martin > ValueBinding lost for first attribute > ------------------------------------- > > Key: TOMAHAWK-764 > URL: http://issues.apache.org/jira/browse/TOMAHAWK-764 > Project: MyFaces Tomahawk > Issue Type: Bug > Components: Extended Datatable > Affects Versions: 1.1.4-SNAPSHOT, 1.1.3 > Environment: myFaces core1.1.4 > tomahawk 1.1.4 Snapshot > Reporter: Michael Heinen > > There is a major bug using the t:datatable in conjunction with the > t:datascroller and a valueBinding for the first attribute. > The HtmlDataScroller erases this value binding due to the fact, that it calls > setFirst with an int in the broadcast method. > If the page is then reloaded via ajax, then first contains a pagenumber > instead of the valuebinding. > Patch for setFirst: > public void setFirst(int first) > { > ValueBinding vb = getValueBinding("first"); > if (vb != null) > { > //do nothing and keep the valueBinding > return; > } > else > if (_preservedDataModel != null) > { > //Also change the currently restored DataModel attribute > _preservedDataModel.setFirst(first); > } > super.setFirst(first); > } > see this threads: > http://marc.theaimsgroup.com/?l=myfaces-user&m=116211813709147&w=2 > http://marc.theaimsgroup.com/?l=myfaces-user&m=114529361608223&w=2 > Michael -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
