[
https://issues.jboss.org/browse/RF-12289?page=com.atlassian.jira.plugin.s...
]
Brian Leathem updated RF-12289:
-------------------------------
Description:
Trying to have datascroller with dynamic rows number, but it works only if dataScroller is
above the table.
Basically, what I have is:
{code}
<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>
{code}
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)
was:
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)
rich:dataTable and rich:dataScroller inside h:panelGroup -
doesn't display the correct number of rows when number of rows is updated
------------------------------------------------------------------------------------------------------------------------------------
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, 4.3.5
Reporter: Nicolas Daniels
Fix For: 5-Tracking
Attachments: another-reproducer.zip, richfaces-sandbox.zip,
rich_dataTable-rows.png, 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:
{code}
<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>
{code}
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
For more information on JIRA, see:
http://www.atlassian.com/software/jira