Bug 977630 - Columns are resized uncorrectly when ExtendedDataTable is in Modal panel and they are invisible.
Columns are resized uncorrectly when ExtendedDataTable is in Modal panel and ...
Status: NEW
Product: JBoss Enterprise WFK Platform 1
Classification: JBoss
Component: RichFaces (Show other bugs)
1.2
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jay Balunas
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 22:56 EDT by Takayuki Konishi
Modified: 2016-06-01 11:58 EDT (History)
0 users

See Also:
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: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker RF-8141 Minor Closed IE 8: resize of invisible extended data table leads to JavaScript error in calculateWidthsFromRatios 2017-01-11 03:32 EST

  None (edit)
Description Takayuki Konishi 2013-06-24 22:56:55 EDT
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-24 23:05:58 EDT
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-24 23:08:00 EDT
Workaround: Make the panel visible then resize the browser window.
Comment 3 JBoss JIRA Server 2016-06-01 11:58:47 EDT
Michal Petrov <mpetrov@redhat.com> updated the status of jira RF-8141 to Closed

Note You need to log in before you can comment on or make changes to this bug.