Wait! Looks like we don't have enough information to add this to bug database. Please follow this template bug format.
  1. #1
    Ext GWT Premium Member dardison's Avatar
    Join Date
    Apr 2008
    Location
    Buenos Aires, Argentina
    Posts
    173
    Vote Rating
    1
    dardison is on a distinguished road

      0  

    Default Grid with CheckBoxSelectionModel + button on a Column,inside a Portlet render wrong

    Grid with CheckBoxSelectionModel + button on a Column,inside a Portlet render wrong


    Hi,

    I was experimenting this problem. I have e Grid with CheckBoxSelectionModel that also have a Buttom in some column. The grid is inside a Portlet in a Portal.

    The problem is that the checkboxes gets hidden except for the first row.

    OS Version : Windows 7
    Browser : FireFox
    Tested in: Dev mode

    TestCase

    I have a testcase that reproduce the problem, which is a modified PortalLayoutContainerExample you can see it here:

    Code:
    package com.sencha.gxt.explorer.client.layout;
    
    
    import java.util.ArrayList;
    import java.util.Date;
    import java.util.List;
    
    
    import com.google.gwt.cell.client.AbstractCell;
    import com.google.gwt.cell.client.DateCell;
    import com.google.gwt.core.client.EntryPoint;
    import com.google.gwt.core.client.GWT;
    import com.google.gwt.i18n.client.DateTimeFormat;
    import com.google.gwt.i18n.client.NumberFormat;
    import com.google.gwt.safecss.shared.SafeStyles;
    import com.google.gwt.safecss.shared.SafeStylesUtils;
    import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
    import com.google.gwt.user.client.ui.HTML;
    import com.google.gwt.user.client.ui.IsWidget;
    import com.google.gwt.user.client.ui.RootPanel;
    import com.google.gwt.user.client.ui.Widget;
    import com.sencha.gxt.cell.core.client.TextButtonCell;
    import com.sencha.gxt.core.client.IdentityValueProvider;
    import com.sencha.gxt.core.client.ToStringValueProvider;
    import com.sencha.gxt.core.client.resources.CommonStyles;
    import com.sencha.gxt.data.shared.ListStore;
    import com.sencha.gxt.examples.resources.client.ExampleStyles;
    import com.sencha.gxt.examples.resources.client.TestData;
    import com.sencha.gxt.examples.resources.client.model.Stock;
    import com.sencha.gxt.examples.resources.client.model.StockProperties;
    import com.sencha.gxt.explorer.client.model.Example.Detail;
    import com.sencha.gxt.widget.core.client.ContentPanel;
    import com.sencha.gxt.widget.core.client.Portlet;
    import com.sencha.gxt.widget.core.client.button.TextButton;
    import com.sencha.gxt.widget.core.client.button.ToolButton;
    import com.sencha.gxt.widget.core.client.container.NorthSouthContainer;
    import com.sencha.gxt.widget.core.client.container.PortalLayoutContainer;
    import com.sencha.gxt.widget.core.client.event.SelectEvent;
    import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
    import com.sencha.gxt.widget.core.client.grid.CheckBoxSelectionModel;
    import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
    import com.sencha.gxt.widget.core.client.grid.ColumnModel;
    import com.sencha.gxt.widget.core.client.grid.Grid;
    import com.sencha.gxt.widget.core.client.tips.QuickTip;
    import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
    
    
    @Detail(name = "PortalLayout", icon = "portal", category = "Layouts", fit = true)
    public class PortalLayoutContainerExample implements IsWidget, EntryPoint {
    
    
      private static final StockProperties props = GWT.create(StockProperties.class);
      private PortalLayoutContainer portal;
    
    
      @Override
      public Widget asWidget() {
        if (portal == null) {
          portal = new PortalLayoutContainer(2);
          portal.getElement().getStyle().setBackgroundColor("white");
          portal.setColumnWidth(0, .60);
          portal.setColumnWidth(1, .40);
    
    
          Portlet portlet = new Portlet();
          portlet.setHeadingText("Grid in a Portlet");
          configPanel(portlet);
          portlet.add(createGrid());
          portlet.setHeight(250);
          portal.add(portlet, 0);
    
    
          portlet = new Portlet();
          portlet.setHeadingText("Another Panel 1");
          configPanel(portlet);
          portlet.add(getBogusText());
          portal.add(portlet, 0);
    
    
          portlet = new Portlet();
          portlet.setHeadingText("Panel 2");
          configPanel(portlet);
          portlet.add(getBogusText());
          portal.add(portlet, 1);
    
    
        }
        return portal;
      }
      
      public Widget createGrid() {
        ContentPanel panel=new ContentPanel();
        panel.setHeaderVisible(false);
        NorthSouthContainer northSouth=new NorthSouthContainer();
        ToolBar toolBar=new ToolBar();
        TextButton button=new TextButton("Dummy Button");
        toolBar.add(button);
        northSouth.setNorthWidget(toolBar);
        panel.setWidget(northSouth);
        final NumberFormat number = NumberFormat.getFormat("0.00");
    
    
        ColumnConfig<Stock, String> nameCol = new ColumnConfig<Stock, String>(props.name(), 200, "Company");
        ColumnConfig<Stock, String> symbolCol = new ColumnConfig<Stock, String>(props.symbol(), 100, "Symbol");
        ColumnConfig<Stock, Double> lastCol = new ColumnConfig<Stock, Double>(props.last(), 75, "Last");
    
    
        ColumnConfig<Stock, Double> changeCol = new ColumnConfig<Stock, Double>(props.change(), 100, "Change");
        changeCol.setCell(new AbstractCell<Double>() {
    
    
          @Override
          public void render(Context context, Double value, SafeHtmlBuilder sb) {
            String style = "style='color: " + (value < 0 ? "red" : "green") + "'";
            String v = number.format(value);
            sb.appendHtmlConstant("<span " + style + " qtitle='Change' qtip='" + v + "'>" + v + "</span>");
          }
        });
    
    
        ColumnConfig<Stock, Date> lastTransCol = new ColumnConfig<Stock, Date>(props.lastTrans(), 100, "Last Updated");
        lastTransCol.setCell(new DateCell(DateTimeFormat.getFormat("MM/dd/yyyy")));
        IdentityValueProvider<Stock> identity = new IdentityValueProvider<Stock>();
        CheckBoxSelectionModel<Stock> sm=new CheckBoxSelectionModel<Stock>(identity);
        SafeStyles textStyles = SafeStylesUtils.fromTrustedString("padding: 1px 3px;");
        ToStringValueProvider<Stock> provider=new ToStringValueProvider<Stock>();
       
        TextButtonCell tb=new TextButtonCell();
        ColumnConfig<Stock, String> editorColumn=new ColumnConfig<Stock, String>(provider);
    
    
        tb.setText("Edit");
        editorColumn.setCell(tb);
        editorColumn.setHeader(tb.getText());
        editorColumn.setColumnTextClassName(CommonStyles.get().inlineBlock());
        editorColumn.setColumnTextStyle(textStyles);
        editorColumn.setHideable(false);
        editorColumn.setSortable(false);
        List<ColumnConfig<Stock, ?>> l = new ArrayList<ColumnConfig<Stock, ?>>();
        l.add(sm.getColumn());
        l.add(nameCol);
        l.add(symbolCol);
        l.add(lastCol);
        l.add(changeCol);
        l.add(lastTransCol);
        l.add(editorColumn);
        ColumnModel<Stock> cm = new ColumnModel<Stock>(l);
    
    
        ListStore<Stock> store = new ListStore<Stock>(props.key());
        store.addAll(TestData.getStocks());
    
    
        final Grid<Stock> grid = new Grid<Stock>(store, cm);
        grid.setSelectionModel(sm);
        grid.getView().setAutoExpandColumn(nameCol);
        grid.setBorders(true);
        grid.getView().setStripeRows(true);
        grid.getView().setColumnLines(true);
    
    
        // needed to enable quicktips (qtitle for the heading and qtip for the
        // content) that are setup in the change GridCellRenderer
        new QuickTip(grid);
        northSouth.setWidget(grid);
        return panel;
      }
    
    
      @Override
      public void onModuleLoad() {
        RootPanel.get().add(this);
      }
    
    
      private void configPanel(final Portlet panel) {
        panel.setCollapsible(true);
        panel.setAnimCollapse(false);
        panel.getHeader().addTool(new ToolButton(ToolButton.GEAR));
        panel.getHeader().addTool(new ToolButton(ToolButton.CLOSE, new SelectHandler() {
    
    
          @Override
          public void onSelect(SelectEvent event) {
            panel.removeFromParent();
          }
        }));
      }
    
    
      private HTML getBogusText() {
        HTML html = new HTML(TestData.DUMMY_TEXT_SHORT);
        html.addStyleName(ExampleStyles.get().paddedText());
        return html;
      }
    
    
    }
    You can simple replace my code in the example and run it to reproduce the problem.

    Regards,
    Daniel

  2. #2
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    Thanks for the report! I have opened a bug in our bug tracker.

  3. #3
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    We've so far been unable to reproduce this in Firefox or Chrome, on Linux or Windows (both xp and 7). Which FF version are you using? Does this also happen in prod mode? Are there any steps to take, or does it just break when the page loads? Have you been able to reproduce this on other machines?

  4. #4
    Sencha - GXT Dev Team
    Join Date
    Feb 2009
    Location
    Minnesota
    Posts
    2,731
    Vote Rating
    90
    Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light Colin Alworth is a glorious beacon of light

      0  

    Default


    This appears to be a version mismatch issue - this should be fixed with EXTGWT-2223, http://www.sencha.com/forum/showthread.php?226247

  5. #5
    Ext GWT Premium Member dardison's Avatar
    Join Date
    Apr 2008
    Location
    Buenos Aires, Argentina
    Posts
    173
    Vote Rating
    1
    dardison is on a distinguished road

      0  

    Default


    Yes I confirm Colin's report, I tested with latest version Ext GWT 3.0.2 from SVN and the problem was resolved.

    Thanks for your help Colin.

    Regards
    Daniel

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..." hd porno faketaxi