[
https://issues.jboss.org/browse/RF-11850?page=com.atlassian.jira.plugin.s...
]
Brian Leathem updated RF-11850:
-------------------------------
Description:
Hello,
I've encountered some problems using richfaces extendedDataTables in RichFace
4.1.0.Final
Here is the facelet:
{code:title=facelet}
<h:form>
<rich:extendedDataTable value="#{tableDemoManager.demoList}"
var="item" style="height:300px; width:500px;">
<rich:column>
<f:facet name="header">Header7</f:facet>
#{item.name}
</rich:column>
<rich:column>
<f:facet name="header">Header8</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header9</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header10</f:facet>
#{item.uuid}
</rich:column>
</rich:extendedDataTable>
</h:form>
<h:form>
<rich:extendedDataTable value="#{tableDemoManager.demoList}"
var="item" style="height:300px; width:500px;">
<rich:column>
<f:facet name="header">Header7</f:facet>
#{item.name}
</rich:column>
<rich:column>
<f:facet name="header">Header8</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header9</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header10</f:facet>
#{item.uuid}
</rich:column>
</rich:extendedDataTable>
</h:form>
{code}
Resizing the columns on the first table works perfectly, but if someone tries to resize
the second tables' columns as well, I've got NullPointer exceptions like:
{code:title=stacktrace}
java.lang.NullPointerException
at
org.richfaces.renderkit.SortingFilteringRowsRenderer.updateAttribute(SortingFilteringRowsRenderer.java:135)
[richfaces-components-ui-4.1.0.Final.jar:
at
org.richfaces.renderkit.ExtendedDataTableRenderer.updateWidthOfColumns(ExtendedDataTableRenderer.java:825)
[richfaces-components-ui-4.1.0.Final.jar:]
at
org.richfaces.renderkit.ExtendedDataTableRenderer.doDecode(ExtendedDataTableRenderer.java:808)
[richfaces-components-ui-4.1.0.Final.jar:]
at org.richfaces.renderkit.RendererBase.decode(RendererBase.java:80)
[richfaces-components-ui-4.1.0.Final.jar:]
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at org.richfaces.component.UIDataAdaptor.processDecodes(UIDataAdaptor.java:819)
[richfaces-components-ui-4.1.0.Final.jar:]
at
org.richfaces.context.PartialViewExecuteVisitCallback.visit(PartialViewExecuteVisitCallback.java:53)
[richfaces-core-impl-4.1.0.Final.jar:]
at
org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321)
[richfaces-core-impl-4.1.0.Final.jar:]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1319)
[richfaces-components-ui-4.1.0.Final.jar:]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIForm.visitTree(UIForm.java:344)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.richfaces.context.ExtendedPartialViewContextImpl.executeComponents(ExtendedPartialViewContextImpl.java:237)
[richfaces-core-impl-4.1.0.Final.jar:
at
org.richfaces.context.ExtendedPartialViewContextImpl.processPartialExecutePhase(ExtendedPartialViewContextImpl.java:217)
[richfaces-core-impl-4.1.0.F
at
org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:196)
[richfaces-core-impl-4.1.0.Final.jar:]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
{code}
was:
Hello,
I've encountered some problems using richfaces extendedDataTables in RichFace
4.1.0.Final
Here is the facelet:
<h:form>
<rich:extendedDataTable value="#{tableDemoManager.demoList}"
var="item" style="height:300px; width:500px;">
<rich:column>
<f:facet name="header">Header7</f:facet>
#{item.name}
</rich:column>
<rich:column>
<f:facet name="header">Header8</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header9</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header10</f:facet>
#{item.uuid}
</rich:column>
</rich:extendedDataTable>
</h:form>
<h:form>
<rich:extendedDataTable value="#{tableDemoManager.demoList}"
var="item" style="height:300px; width:500px;">
<rich:column>
<f:facet name="header">Header7</f:facet>
#{item.name}
</rich:column>
<rich:column>
<f:facet name="header">Header8</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header9</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header10</f:facet>
#{item.uuid}
</rich:column>
</rich:extendedDataTable>
</h:form>
Resizing the columns on the first table works perfectly, but if someone tries to resize
the second tables' columns as well, I've got NullPointer exceptions like:
java.lang.NullPointerException
at
org.richfaces.renderkit.SortingFilteringRowsRenderer.updateAttribute(SortingFilteringRowsRenderer.java:135)
[richfaces-components-ui-4.1.0.Final.jar:
at
org.richfaces.renderkit.ExtendedDataTableRenderer.updateWidthOfColumns(ExtendedDataTableRenderer.java:825)
[richfaces-components-ui-4.1.0.Final.jar:]
at
org.richfaces.renderkit.ExtendedDataTableRenderer.doDecode(ExtendedDataTableRenderer.java:808)
[richfaces-components-ui-4.1.0.Final.jar:]
at org.richfaces.renderkit.RendererBase.decode(RendererBase.java:80)
[richfaces-components-ui-4.1.0.Final.jar:]
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at org.richfaces.component.UIDataAdaptor.processDecodes(UIDataAdaptor.java:819)
[richfaces-components-ui-4.1.0.Final.jar:]
at
org.richfaces.context.PartialViewExecuteVisitCallback.visit(PartialViewExecuteVisitCallback.java:53)
[richfaces-core-impl-4.1.0.Final.jar:]
at
org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321)
[richfaces-core-impl-4.1.0.Final.jar:]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1319)
[richfaces-components-ui-4.1.0.Final.jar:]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIForm.visitTree(UIForm.java:344)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.richfaces.context.ExtendedPartialViewContextImpl.executeComponents(ExtendedPartialViewContextImpl.java:237)
[richfaces-core-impl-4.1.0.Final.jar:
at
org.richfaces.context.ExtendedPartialViewContextImpl.processPartialExecutePhase(ExtendedPartialViewContextImpl.java:217)
[richfaces-core-impl-4.1.0.F
at
org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:196)
[richfaces-core-impl-4.1.0.Final.jar:]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
Steps to Reproduce:
# create a facelet with two or more extendeddatatables. It doesn't matter if
they're in different forms, regions or something else.
# try to resize columns on one table.
# then try resize a column on another column.
this should reproduce the described error.
was:
create a facelet with two or more extendeddatatables. It doesn't matter if they're
in different forms, regions or something else.
try to resize columns on one table.
then try resize a column on another column.
this should reproduce the described error.
Assignee: Pavol Pitonak
Workaround Description:
I've looked into the richfaces clientside javascript codes:
{code}
RichFaces.ui.ExtendedDataTable.prototype.setColumnWidth = function (id, width) {
console.log("setColumnWidth");
width = width + "px";
RichFaces.utils.getCSSRule("." + WIDTH_CLASS_NAME_BASE + id).style.width =
width;
this.newWidths = {}; // added by me!
this.newWidths[id] = width;
var widthsArray = new Array();
for (var id in this.newWidths) {
widthsArray.push(id + ":" + this.newWidths[id]);
}
console.log(this.newWidths);
console.log(widthsArray);
this.widthInput.value = widthsArray.toString();
this.updateLayout();
this.adjustResizers();
this.ajaxFunction();
}
{code}
The interesting part is the this.newWidths = {}; object. I've added this line. Without
it, this object will grow on each column resize. If you go the the second table, this
object will not become cleared and therefore still contains the column resize data of the
first table.
After clearing the this.newWidths object, the resizing seems to work.
But I'm not sure why to keep the data stored in the first place after the resizing is
done.
was:
I've looked into the richfaces clientside javascript codes:
RichFaces.ui.ExtendedDataTable.prototype.setColumnWidth = function (id, width) {
console.log("setColumnWidth");
width = width + "px";
RichFaces.utils.getCSSRule("." + WIDTH_CLASS_NAME_BASE + id).style.width =
width;
this.newWidths = {}; // added by me!
this.newWidths[id] = width;
var widthsArray = new Array();
for (var id in this.newWidths) {
widthsArray.push(id + ":" + this.newWidths[id]);
}
console.log(this.newWidths);
console.log(widthsArray);
this.widthInput.value = widthsArray.toString();
this.updateLayout();
this.adjustResizers();
this.ajaxFunction();
}
The interesting part is the this.newWidths = {}; object. I've added this line. Without
it, this object will grow on each column resize. If you go the the second table, this
object will not become cleared and therefore still contains the column resize data of the
first table.
After clearing the this.newWidths object, the resizing seems to work.
But I'm not sure why to keep the data stored in the first place after the resizing is
done.
Forum Reference:
http://community.jboss.org/message/641921#641921 (was:
http://community.jboss.org/message/641921#641921)
Christian, thanks for the report, and for taking the time to debug the javascript and
isolate the cause.
Pavol, please create a metamer test case to reproduce this issue.
RF 4.1.0.Final: Problem using columnResize with more than one
extendedDataTable on the same page.
-------------------------------------------------------------------------------------------------
Key: RF-11850
URL:
https://issues.jboss.org/browse/RF-11850
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-tables
Affects Versions: 4.1.0.Final
Environment: Windows 7 x64 or arch linux x86
JBoss 7.0.1 Final or Glassfish 3.1
Reporter: Christian Peter
Assignee: Pavol Pitonak
Priority: Minor
Hello,
I've encountered some problems using richfaces extendedDataTables in RichFace
4.1.0.Final
Here is the facelet:
{code:title=facelet}
<h:form>
<rich:extendedDataTable value="#{tableDemoManager.demoList}"
var="item" style="height:300px; width:500px;">
<rich:column>
<f:facet name="header">Header7</f:facet>
#{item.name}
</rich:column>
<rich:column>
<f:facet name="header">Header8</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header9</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header10</f:facet>
#{item.uuid}
</rich:column>
</rich:extendedDataTable>
</h:form>
<h:form>
<rich:extendedDataTable value="#{tableDemoManager.demoList}"
var="item" style="height:300px; width:500px;">
<rich:column>
<f:facet name="header">Header7</f:facet>
#{item.name}
</rich:column>
<rich:column>
<f:facet name="header">Header8</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header9</f:facet>
#{item.uuid}
</rich:column>
<rich:column>
<f:facet name="header">Header10</f:facet>
#{item.uuid}
</rich:column>
</rich:extendedDataTable>
</h:form>
{code}
Resizing the columns on the first table works perfectly, but if someone tries to resize
the second tables' columns as well, I've got NullPointer exceptions like:
{code:title=stacktrace}
java.lang.NullPointerException
at
org.richfaces.renderkit.SortingFilteringRowsRenderer.updateAttribute(SortingFilteringRowsRenderer.java:135)
[richfaces-components-ui-4.1.0.Final.jar:
at
org.richfaces.renderkit.ExtendedDataTableRenderer.updateWidthOfColumns(ExtendedDataTableRenderer.java:825)
[richfaces-components-ui-4.1.0.Final.jar:]
at
org.richfaces.renderkit.ExtendedDataTableRenderer.doDecode(ExtendedDataTableRenderer.java:808)
[richfaces-components-ui-4.1.0.Final.jar:]
at org.richfaces.renderkit.RendererBase.decode(RendererBase.java:80)
[richfaces-components-ui-4.1.0.Final.jar:]
at javax.faces.component.UIComponentBase.decode(UIComponentBase.java:787)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at org.richfaces.component.UIDataAdaptor.processDecodes(UIDataAdaptor.java:819)
[richfaces-components-ui-4.1.0.Final.jar:]
at
org.richfaces.context.PartialViewExecuteVisitCallback.visit(PartialViewExecuteVisitCallback.java:53)
[richfaces-core-impl-4.1.0.Final.jar:]
at
org.richfaces.context.BaseExtendedVisitContext.invokeVisitCallback(BaseExtendedVisitContext.java:321)
[richfaces-core-impl-4.1.0.Final.jar:]
at org.richfaces.component.UIDataAdaptor.visitTree(UIDataAdaptor.java:1319)
[richfaces-components-ui-4.1.0.Final.jar:]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIForm.visitTree(UIForm.java:344)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at javax.faces.component.UIComponent.visitTree(UIComponent.java:1600)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.richfaces.context.ExtendedPartialViewContextImpl.executeComponents(ExtendedPartialViewContextImpl.java:237)
[richfaces-core-impl-4.1.0.Final.jar:
at
org.richfaces.context.ExtendedPartialViewContextImpl.processPartialExecutePhase(ExtendedPartialViewContextImpl.java:217)
[richfaces-core-impl-4.1.0.F
at
org.richfaces.context.ExtendedPartialViewContextImpl.processPartial(ExtendedPartialViewContextImpl.java:196)
[richfaces-core-impl-4.1.0.Final.jar:]
at javax.faces.component.UIViewRoot.processDecodes(UIViewRoot.java:931)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:78)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
[jsf-impl-2.1.3-b02-jbossorg-2.jar:2.1.3-SNAPSHOT]
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:593)
[jboss-jsf-api_2.1_spec-2.0.0.Beta1.jar:2.0.0.Beta1]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
at
org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
[weld-core-1.1.2.Final.jar:2011-07-26 15:02]
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280)
[jbossweb-7.0.1.Final.jar:7.0.2.Final]
{code}
--
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