Neseek77 / google-web-toolkit-incubator

Automatically exported from code.google.com/p/google-web-toolkit-incubator
1 stars 0 forks source link

ScrollTable Issue : Header and datatables of the ScrollTable are misaligned when using horizontal scroll #389

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of gwt and gwt-incubator are you using?
GWT - 2.4 
GWT incubator - 2.1
My application is using GWT 2.4 for IE 9 support and with few changes we could 
use the widgets of GWT incubator 2.1

What OS and browser are you using?
Windows, Firefox version 3.6, IE 8 and IE 9

Do you see this error in hosted mode, web mode, or both?
Both

Test Case - I have a scrollTable which is populated dynamically. (The rows and 
columns are calculated on fly and data is populated). My ScrollTable supports 
both horizontal and vertical scroll. When I have lot of columns and I scroll 
horizontally to view the data, I see a misalignment in the way header & 
dataTables are rendered.  I suspect GWT rendering is happening slowly and it is 
causing the issue.

Here goes the code : 

public class TestScrollTable implements EntryPoint {

    public FixedWidthGrid dataTable = new FixedWidthGrid(200,20);   
    public FixedWidthFlexTable headerTable = new FixedWidthFlexTable();
    public ScrollTable table = new ScrollTable(dataTable, headerTable);

    @Override
    public void onModuleLoad() {

        table.setColumnResizePolicy(ColumnResizePolicy.SINGLE_CELL);
        table.setResizePolicy(ResizePolicy.UNCONSTRAINED);
        table.setScrollPolicy(ScrollPolicy.BOTH);
        table.setSortPolicy(SortPolicy.SINGLE_CELL);
        RootPanel.get().add(table);

        for (int i = 0; i < 20; i++) {
            headerTable.setHTML(0, i, "Header " + i);
        }

        for (int i = 0; i < 200; i++) {
            for (int j = 0; j < 20; j++) {
                final int row = i;
                final int column = j;                         
                dataTable.setHTML(row, column, "Cell " + row + ":" + column);
            }
        }
        table.redraw();
    }

    }

What steps will reproduce the problem?
1. Running the above code and using the web application via remote desktop. 
(The issue is not seen always)

What is the expected output? What do you see instead?
Expected Output -> On horizontal scroll, the header & dataTables of scrollTable 
must be aligned properly. There is a misalignment.

Actual Output -> Misalignment of data & header tables when using horizontal 
scroll.

Workaround if you have one:

When I resize the header table, the whole scrollTable gets aligned properly. 
But this, if done programatically might be a performance issue.
If we navigate to other browser tab and return, the issue is not seen.

Additional Info 
1. I have tried running the above code using GWT css for ScrollTable widget and 
using my custom CSS. 
2. Have tried to use DeferredCommand before redrawing the scrollTable.
The above scenarios have not yielded any results.
Looking for a quick response from the GWT team.

Thanks in advance :)

Original issue reported on code.google.com by jonathansmith399 on 1 Aug 2012 at 7:03

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi, 

  By adding table.resetColumnWidths()after drawing the ScrollTable in the above code, I was able to resolve the issue in FireFox. But when I drag the header of a particular column and do a refresh my changes are lost. All the columns are getting equally resized. I want to retain the width of the column I had dragged and get rid of the header and datatable misalignment when using horizontal scroll. Can anyone please suggest how this can be done ?

Regards,
JS

Original comment by jonathansmith399 on 24 Aug 2012 at 2:08

GoogleCodeExporter commented 9 years ago
Hi All,

          Any updates on this issue ...?

Regards,
JS

Original comment by jonathansmith399 on 10 Oct 2012 at 10:51

GoogleCodeExporter commented 9 years ago
Hi All,

     Could anyone look into this issue ...? 
     Also if this is not the correct site to post this issue, please suggest where it should be done so that it is addressed.

Regards,
JS

Original comment by jonathansmith399 on 16 Jan 2013 at 8:43