[JBoss JIRA] Created: (RF-3598) dataTable does not re-render correctly after deleting a row with immediate="true"
by Jonck van der Kogel (JIRA)
dataTable does not re-render correctly after deleting a row with immediate="true"
---------------------------------------------------------------------------------
Key: RF-3598
URL: http://jira.jboss.com/jira/browse/RF-3598
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.1.4
Environment: JBoss 4.0.5, JSF 1.2
Reporter: Jonck van der Kogel
Priority: Critical
Given the following sample code:
<t:div id="testDiv">
<rich:dataTable
value="#{backingBean.holders}"
var="holder">
<f:facet name="header">
<rich:columnGroup>
<rich:column>
<h:outputText value="TestColumn">
</rich:column>
<rich:column>
<h:outputText value="DeleteColumn">
</rich:column>
</rich:columnGroup>
</f:facet>
<rich:column>
<h:outputText value="#{holder.testValue}" />
</rich:column>
<rich:column>
<a4j:commandLink action="#{backingBean.deleteRow}"
reRender="testDiv"
value="testLink"
immediate="true">
<f:setPropertyActionListener
value="#{holder}"
target="#{backingBean.toBeDeletedHolder}" />
</a4j:commandLink>
</rich:column>
</rich:dataTable>
</t:div>
The Java code in the backingBean to remove the row is:
public void deleteRow() {
holders.remove(toBeDeletedHolder);
}
Let's say this table has 4 rows. When you now press the delete link of the second row, the model gets updated correctly, indeed the second row is removed. But in the view, it appears like the 3d row (always the row directly below the row that was intended) is removed, not the second. Removing the immediate="true" attribute resolves the issue, but is undesirable since then validation comes into play, which is precisely why you put immediate="true" on such a component in the first place.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 6 months
[JBoss JIRA] Created: (RF-3842) scrollableDataTable: "java.lang.ArithmeticException" during using findComponent for geting component's selection or rowData.
by Mikhail Vitenkov (JIRA)
scrollableDataTable: "java.lang.ArithmeticException" during using findComponent for geting component's selection or rowData.
----------------------------------------------------------------------------------------------------------------------------
Key: RF-3842
URL: http://jira.jboss.com/jira/browse/RF-3842
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.2
Environment: IE6, IE7, FF 3.0, Opera 9.27, Safari 3.1
Reporter: Mikhail Vitenkov
Assigned To: Pavel Yaschenko
Step 1. Get selection from scrollableDataTable using findComponent following way:
<h:panelGrid columns="2">
<rich:column>
<a4j:commandLink value="getSelection" reRender="findID"></a4j:commandLink>
</rich:column>
<rich:column>
<h:outputText id="findID" value="#{rich:findComponent('sdt').selection}" />
</rich:column>
</h:panelGrid>
'sdt' - id of the component.
Step 2. Select any row of the scrollableDataTable.
Step 3. Click 'getSelection' link.
Actual behavior:
javax.faces.FacesException: Exception while decoding component : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /pages/Rich/Rich.jsp][Class: javax.faces.component.html.HtmlForm,Id: formID][Class: javax.faces.component.html.HtmlPanelGrid,Id: richGridID][Class: javax.faces.component.html.HtmlPanelGroup,Id: j_id_jsp_357983163_10][Class: javax.faces.component.UINamingContainer,Id: scrollableDataTableSubviewID][Class: org.richfaces.component.html.HtmlScrollableDataTable,Id: dataList]}
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:515)
at org.ajax4jsf.component.UIDataAdaptor.processDecodes(UIDataAdaptor.java:1160)
at org.ajax4jsf.component.UIDataAdaptor.processDecodes(UIDataAdaptor.java:1169)
at org.richfaces.component.UIScrollableDataTable.processDecodes(UIScrollableDataTable.java:140)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:637)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:637)
at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:637)
at javax.faces.component.UIForm.processDecodes(UIForm.java:57)
at org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:388)
at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:235)
at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:405)
at org.apache.myfaces.lifecycle.ApplyRequestValuesExecutor.execute(ApplyRequestValuesExecutor.java:32)
at org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:103)
at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:76)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:148)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:265)
at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:376)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:503)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ArithmeticException: / by zero
at org.richfaces.renderkit.html.ScrollableDataTableBaseRenderer.doDecode(ScrollableDataTableBaseRenderer.java:643)
at org.ajax4jsf.renderkit.RendererBase.decode(RendererBase.java:76)
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:511)
... 32 more
The same exception take place in case getRowData method.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
16 years, 6 months