[richfaces-issues] [JBoss JIRA] (RF-11875) rich:extendedDataTable in ajax loading mode, crashes when dataset length changes between requests
Jan Papousek (JIRA)
jira-events at lists.jboss.org
Wed Jan 25 08:05:48 EST 2012
[ https://issues.jboss.org/browse/RF-11875?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jan Papousek updated RF-11875:
------------------------------
Steps to Reproduce:
I have used "/richfaces/component-sample.jsf?demo=extendedDataTable" page in RF Showcase to reproduce the problem.
1. Add the following code in "simpleTable-sample.xhtml" in h:form tag:
{code:xml}
<a4j:commandButton action="#{carsBean.remove}" value="removeFirst" >
<a4j:param assignTo="#{carsBean.currentCarIndex}" value="1"/>
</a4j:commandButton>
{code}
2.Open this page "/richfaces/component-sample.jsf?demo=extendedDataTable" in browser.
3.Check "Turn ajax loading on/off" checkbox.
4.Click "removeFirst" button.
5.Scroll table content to the end.
6.Scroll table content to begin.
Table is not refreshed and following exception is logged:
{noformat}
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:365)
at java.util.LinkedList.remove(LinkedList.java:357)
at org.richfaces.renderkit.ExtendedDataTableRenderer$2.process(ExtendedDataTableRenderer.java:520)
at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65)
at org.richfaces.component.UIDataTableBase.walk(UIDataTableBase.java:261)
at org.richfaces.renderkit.ExtendedDataTableRenderer.encodeMetaComponent(ExtendedDataTableRenderer.java:512)
at org.richfaces.component.UIDataTableBase.encodeMetaComponent(UIDataTableBase.java:295)
at org.richfaces.component.AbstractExtendedDataTable.encodeMetaComponent(AbstractExtendedDataTable.java:109)
at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:493)
at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321)
at org.richfaces.context.ExtendedVisitContext.invokeMetaComponentVisitCallback(ExtendedVisitContext.java:68)
at org.richfaces.component.AbstractExtendedDataTable.visitDataChildren(AbstractExtendedDataTable.java:122)
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1357)
at javax.faces.component.UIForm.visitTree(UIForm.java:266)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:797)
at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:992)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:797)
at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:992)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:272)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:194)
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:88)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:389)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:617)
...
{noformat}
----
*You can download and deploy already updated richfaces-showcase-jbas7.war from attachments on JBoss AS 7 (source codes are available on GitHub:* https://github.com/papousek/showcase/tree/RF-11875 *) instead of updating showcase on your own*.
was:
I have used "/richfaces/component-sample.jsf?demo=extendedDataTable" page in RF Showcase to reproduce the problem.
1. Add the following code in "simpleTable-sample.xhtml" in h:form tag:
{code:xml}
<a4j:commandButton action="#{carsBean.remove}" value="removeFirst" >
<a4j:param assignTo="#{carsBean.currentCarIndex}" value="1"/>
</a4j:commandButton>
{code}
2.Open this page "/richfaces/component-sample.jsf?demo=extendedDataTable" in browser.
3.Check "Turn ajax loading on/off" checkbox.
4.Click "removeFirst" button.
5.Scroll table content to the end.
6.Scroll table content to begin.
Table is not refreshed and following exception is logged:
{noformat}
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.LinkedList.entry(LinkedList.java:365)
at java.util.LinkedList.remove(LinkedList.java:357)
at org.richfaces.renderkit.ExtendedDataTableRenderer$2.process(ExtendedDataTableRenderer.java:520)
at org.ajax4jsf.model.SequenceDataModel.walk(SequenceDataModel.java:65)
at org.richfaces.component.UIDataTableBase.walk(UIDataTableBase.java:261)
at org.richfaces.renderkit.ExtendedDataTableRenderer.encodeMetaComponent(ExtendedDataTableRenderer.java:512)
at org.richfaces.component.UIDataTableBase.encodeMetaComponent(UIDataTableBase.java:295)
at org.richfaces.component.AbstractExtendedDataTable.encodeMetaComponent(AbstractExtendedDataTable.java:109)
at org.richfaces.context.ExtendedPartialViewContextImpl$RenderVisitCallback.visit(ExtendedPartialViewContextImpl.java:493)
at org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321)
at org.richfaces.context.ExtendedVisitContext.invokeMetaComponentVisitCallback(ExtendedVisitContext.java:68)
at org.richfaces.component.AbstractExtendedDataTable.visitDataChildren(AbstractExtendedDataTable.java:122)
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1357)
at javax.faces.component.UIForm.visitTree(UIForm.java:266)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:797)
at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:992)
at javax.faces.component.UIComponent.visitTree(UIComponent.java:797)
at javax.faces.component.UIComponentBase.visitTree(UIComponentBase.java:992)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartialRenderPhase(ExtendedPartialViewContextImpl.java:272)
at org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:194)
at javax.faces.context.PartialViewContextWrapper.processPartial(PartialViewContextWrapper.java:88)
at javax.faces.component.UIViewRoot.encodeChildren(UIViewRoot.java:389)
at javax.faces.component.UIComponent.encodeAll(UIComponent.java:617)
...
{noformat}
> rich:extendedDataTable in ajax loading mode, crashes when dataset length changes between requests
> -------------------------------------------------------------------------------------------------
>
> Key: RF-11875
> URL: https://issues.jboss.org/browse/RF-11875
> Project: RichFaces
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: component-ScrollableDataTable
> Affects Versions: 4.1.0.Final
> Environment: JSF-RI 2.0, Tomcat 6.0.29
> Reporter: Dmitry Volkov
> Assignee: Jan Papousek
> Attachments: richfaces-showcase-jbas7.war
>
>
> rich:extendedDataTable in ajax loading mode(clientRows=".."), crashes when dataset length changes between requests.
> It makes ajax loading mode unusable for database paging.
--
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
More information about the richfaces-issues
mailing list