Bug 977630 - Columns are resized uncorrectly when ExtendedDataTable is in Modal panel and they are invisible.
Summary: Columns are resized uncorrectly when ExtendedDataTable is in Modal panel and ...
Keywords:
Status: NEW
Alias: None
Product: JBoss Enterprise WFK Platform 1
Classification: JBoss
Component: RichFaces
Version: 1.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jay Balunas
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-25 02:56 UTC by Takayuki Konishi
Modified: 2018-12-02 16:41 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RF-8141 0 Minor Closed IE 8: resize of invisible extended data table leads to JavaScript error in calculateWidthsFromRatios 2017-01-11 08:32:58 UTC

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


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