Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext User genobis's Avatar
    Join Date
    Nov 2008
    Posts
    10
    Vote Rating
    0
    genobis is on a distinguished road

      0  

    Exclamation [FNR] GroupingView group separator rendering problem + solution proposal

    [FNR] GroupingView group separator rendering problem + solution proposal


    Hi there!

    The problem:
    Group separator (I mean the horizontal bar with group name and collapse/expand button) width is equal to browser window width. So if grid content is wider than browser window, after horizontal scrolling group separator seems to be cut. For example, if browser window is 1280px width, and grid width is 2000px, group separator ends at 1280px counting from left edge of screen. This does not affect functionality, but looks really bad.

    The source:
    I've examined GXT code carefully and found out, that in com.extjs.gxt.ui.client.widget.grid.GroupingView line 281 width is passed to the style attribute:
    Code:
    String gstyle = "width:" + getTotalWidth() + ";";
    And it's set to the correct width value! So, for example, in previous example, gstyle is equal to "width:2000;". Generated HTML with this values is returned to GridView.renderRows and then GridView.refresh methods, the latter calls following code in line 543:
    Code:
    mainBody.setInnerHtml(renderRows(0, -1));
    ...and there it fails. Element's innerHTML is set and rendered rows are visible in browser, but DOM inspector shows that "style" value is empty.

    Solution:
    Solution is surprisingly simple and safe (very unlikely to cause any regressions). When a numerical value is set, CSS standard requires a unit.

    The following code (suggested replacement for com.extjs.gxt.ui.client.widget.grid.GroupingView/281):
    Code:
    String gstyle = "width:" + getTotalWidth() + "px;";
    would produce "width:2000px;" which solves the problem. Checked.

    Workaround:
    Until this bug is fixed this way or another, I'd like to share my workaround with others. This one is dirty, like most workarounds, but works well Just use this class instead of original GroupingView.

    Code:
    public class FixedGroupingView extends GroupingView {
        @Override
        protected void doGroupStart(StringBuilder buf, GroupColumnData g, List<ColumnData> cs, int colCount) {
            final String fixedStyle=g.style.replace(";", "px");
            buf.append(templates.startGroup(g.groupId, g.css, fixedStyle, g.group.toString()));
        }
    }
    Cheers!

    PS: What bothers me is that in Ext GWT 2.2.0 Explorer, there is a "px" after width value. Either its NOT 2.2.0 there, or it's magic

  2. #2
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,971
    Vote Rating
    132
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Thanks for this detailed report. This is fixed now in SVN as of revision 2254

  3. #3
    Ext User genobis's Avatar
    Join Date
    Nov 2008
    Posts
    10
    Vote Rating
    0
    genobis is on a distinguished road

      0  

    Default


    You're welcome, nice to see that fixed

Similar Threads

  1. [FNR] Header group alignment ignored
    By The_Jackal in forum Ext GWT: Bugs (2.x)
    Replies: 3
    Last Post: 23 Jun 2010, 3:59 PM
  2. [FNR] SimpleComboValue deserialization problem (with solution)
    By bandesz in forum Ext GWT: Bugs (1.x)
    Replies: 5
    Last Post: 29 Jun 2009, 6:29 AM
  3. Replies: 1
    Last Post: 20 Feb 2009, 2:15 PM

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."