Bug 977630

Summary: Columns are resized uncorrectly when ExtendedDataTable is in Modal panel and they are invisible.
Product: [JBoss] JBoss Enterprise WFK Platform 1 Reporter: Takayuki Konishi <tkonishi>
Component: RichFacesAssignee: Jay Balunas <tech4j>
Status: NEW --- QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.2   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Takayuki Konishi 2013-06-25 02:56:55 UTC
Description of problem:
Columns are resized uncorrectly when ExtendedDataTable is in Modal panel ,they are invisible and browser window is resized in IE8.

Version-Release number of selected component (if applicable):
RichFaces 3.3.1.SP3
Windows 7
Internet Explorer 9(Document mode: IE8)

How reproducible: 100 %


Steps to Reproduce:
1. Set ExtendedDataTable into Modal panel
2. Pop up the panel and check column sizes of the table
3. Close the panel
4. Resize browser window
5. Pop up the panel again.

Actual results:
Each column size comes to 20px.

Expected results:
Never change column sizes when window resized.

Comment 1 Takayuki Konishi 2013-06-25 03:05:58 UTC
ExtendedDataTable tries to resize columns when window is resized [1]. But in case of the panel is invisible, mainDivWidth and maxWidth come to 0, so width is set to minColumnWidth at line 456.

[1] 
191     OnWindowResize: function(event) {
192         if (this.table) {
193             this.calculateWidthsFromRatios();
194             this.updateLayout();
195             //this.correctColumns();
196         }
197     },

[2]
446         var mainDivWidth = this.mainDiv.getWidth(); //width of the whole div with table
447         LOG.debug('Main DIV: ' + mainDivWidth);
448         var maxWidth = mainDivWidth - scrollbarWidth; //max width of the table
449         LOG.debug('Width to spread: ' + maxWidth);
450         var totalWidth = 0;
451         //set widths according to each column's width ratio
452         for(i = 0;i < c.length - 1;i++) {
453             LOG.debug('Column[' + i + '] ratio: ' + this.ratios[i]);
454             var w = Math.round(this.ratios[i] * maxWidth);
455             if(w < parseInt(this.minColumnWidth)) {
456                w = parseInt(this.minColumnWidth);
457             }


http://anonsvn.jboss.org/repos/richfaces/tags/3.3.1.SP3/ui/extendedDataTable/src/main/javascript/ClientUI/controls/datatable/ExtendedDataTable.js

Also, It reported at JBoss community

https://community.jboss.org/thread/200104

Comment 2 Takayuki Konishi 2013-06-25 03:08:00 UTC
Workaround: Make the panel visible then resize the browser window.

Comment 3 JBoss JIRA Server 2016-06-01 15:58:47 UTC
Michal Petrov <mpetrov> updated the status of jira RF-8141 to Closed