[
https://issues.jboss.org/browse/RF-12289?page=com.atlassian.jira.plugin.s...
]
Jan Papousek updated RF-12289:
------------------------------
Summary: rich:dataTable and rich:dataScroller inside rich:panelGroup -
doesn't work when the number or rows is changing (was: DataScroller - change
displayed rows numbers - below table)
Steps to Reproduce:
# clone
git://github.com/papousek/richfaces-sanbox.git
# checkout RF-12289 branch
# build the project (mvn clean -Prelease)
# deploy target/richfaces-sandbox-jee6.war
# open
http://localhost:8080/richfaces-sandbox-jee6/faces/index.xhtml
# go to the 2nd page in the second table
# change number of rows in rich:dataTable - choose 20 in the second select box
-- there should be 3 rows shown
-- try to do the same with the first rich:dataTable - it's working correctly
Component/s: component-tables
rich:dataTable and rich:dataScroller inside rich:panelGroup -
doesn't work when the number or rows is changing
--------------------------------------------------------------------------------------------------------------
Key: RF-12289
URL:
https://issues.jboss.org/browse/RF-12289
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-tables
Affects Versions: 4.2.1.Final, 4.2.2.Final
Reporter: Nicolas Daniels
Assignee: Jan Papousek
Attachments: test.jspx, TestFace.java
Trying to have datascroller with dynamic rows number, but it works only if dataScroller
is above the table.
Basically, what I have is:
<h:selectOneMenu value="#{myBean.batchRows}">
<f:selectItem itemLabel="10" itemValue="10"/>
<f:selectItem itemLabel="20" itemValue="20"/>
<f:ajax render="table table-ds" />
</h:selectOneMenu>
...
<h:panelGroup>
<rich:dataTable id="table" rows="#{myBean.batchRows}"
value="#{myBean.dataModel}" var="var">
...
</rich:dataTable>
</h:panelGroup>
<rich:dataScroller id="table-ds" page="#{myBean.batchPage}"
for="table" renderIfSinglePage="false"
boundaryControls="hide" fastControls="hide">
...
</rich:dataScroller>
And the behaviour with 21 elements:
- on page 2 displaying 20 element (so only 1 is visible), if I switch to 10, I stay on
page 2 but I still have only 1 element visible.
If my datascroller is above my table it works fine. If the table is not wrapped within a
panelGroup, it works as well.
Debugging a bit, it seems that when UIDataAdaptor.walk method is 1st called,
getComponentState() is updating the state rows and first properties with values:
- rows: 10 (correct)
- first: 20 (weird)
Following calls to this method is setting those properties to:
- rows: 10 (correct)
- first: 10 (correct)
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira