[
https://issues.jboss.org/browse/RF-12033?page=com.atlassian.jira.plugin.s...
]
Yuriy Pogorzhelskiy edited comment on RF-12033 at 8/31/12 3:15 PM:
-------------------------------------------------------------------
Duplicated:
https://issues.jboss.org/browse/RF-11551
Bug is in JavaScript part.
When EDT is placed on hidden page (tab) parent DIV has attribute display=none , and in
this case invocation: this.element.clientWidth returns 0.
Source-code: RichFaces-4.2.2.Final
extendedDataTable.js#updateLayout
Line 283: var width = Math.max(0, this.element.clientWidth - offsetWidth);
width == 0 and we have this
Line 307: this.normalPartStyle.display = "none";
Hidden parent is a root cause.
As a workaround i can suggest the next changes
extendedDataTable.js#initialize:
Lines 396: this.updateLayout();
Lines 396: this.updateScrollPosition(); //TODO Restore horizontal scroll position
replace with:
if (this.element.parentNode.clientWidth > 0) {
this.updateLayout();
this.updateScrollPosition(); //TODO Restore horizontal scroll position
}
More elegant solution would be some hook - when parent div is become visible -
updateLayout is invoked, but I don't see the way in which we can do it now.
was (Author: ypogorzhelskiy):
Bug is in JavaScript part.
When EDT is placed on hidden page (tab) parent DIV has attribute display=none , and in
this case invocation: this.element.clientWidth returns 0.
Source-code: RichFaces-4.2.2.Final
extendedDataTable.js#updateLayout
Line 283: var width = Math.max(0, this.element.clientWidth - offsetWidth);
width == 0 and we have this
Line 307: this.normalPartStyle.display = "none";
Hidden parent is a root cause.
As a workaround i can suggest the next changes
extendedDataTable.js#initialize:
Lines 396: this.updateLayout();
Lines 396: this.updateScrollPosition(); //TODO Restore horizontal scroll position
replace with:
if (this.element.parentNode.clientWidth > 0) {
this.updateLayout();
this.updateScrollPosition(); //TODO Restore horizontal scroll position
}
More elegant solution would be some hook - when parent div is become visible -
updateLayout is invoked, but I don't see the way in which we can do it now.
ExtendedDataTable doesn't show up in tabpanel with
switchType="client"
----------------------------------------------------------------------
Key: RF-12033
URL:
https://issues.jboss.org/browse/RF-12033
Project: RichFaces
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: component-tables
Affects Versions: 4.2.0.Final
Environment: FireFox 10.0.2 (works in IE7)
GlassFish 3.1
Reporter: Josh Hill
Labels: lazy-loaded
Fix For: 4.3-Tracking
Attachments: richfaces-test.zip
ExtendedDataTable doesn't show up in tabpanel with switchType="client"
Facelet file from the attached testcase:
{code}
<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:rich="http://richfaces.org/rich"
xmlns:f="http://java.sun.com/jsf/core">
<h:head>
<title>Test One</title>
</h:head>
<h:body>
<p>Extended datatable inside tabpanel with switchType
"client"</p>
<h:form>
<rich:tabPanel switchType="client">
<rich:tab>
<f:facet name="header">
Tab One
</f:facet>
Tab One
</rich:tab>
<rich:tab>
<f:facet name="header">
Tab Two
</f:facet>
<rich:extendedDataTable value="#{colorsBean.colors}"
var="color">
<rich:column>
<f:facet name="header">
Column 1
</f:facet>
#{color}
</rich:column>
</rich:extendedDataTable>
</rich:tab>
</rich:tabPanel>
</h:form>
</h:body>
</html>
{code}
--
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