1. #1
    Sencha User
    Join Date
    Sep 2009
    Posts
    22
    Vote Rating
    0
    reecegwt is on a distinguished road

      0  

    Question rendering in a grid does not work in IE7

    rendering in a grid does not work in IE7


    hi,


    Label when returned from a cell renderer is not visible in IE7.

    label renderer:

    public
    Object render(ProductTypeModel model,
    String property,
    ColumnData config,
    int rowIndex,
    int colIndex,
    ListStore<ProductTypeModel> store,
    Grid<ProductTypeModel> grid)
    {


    LabelField descriptLabelField =
    new LabelField();
    descriptLabelField.setText(model.<String>get(property));
    ToolTipConfig tooltipConfig = new ToolTipConfig("Click to view " +
    "full details, or drag to your product list on the right");

    ToolTip tooltip = new ToolTip(descriptLabelField, tooltipConfig);
    tooltip.setId("openPopupTip");
    tooltip.setFrame(false);
    tooltip.setAutoHeight(false);
    tooltip.setHeight(35);
    tooltip.setWidth(340);

    return descriptionLabelField;

    }

    if a string is returned it works properly,but i need label to set the tooltip.

    Also,similarly when a custom widget extending Composite is returned from a cell rendere is not visible in IE7.

    It works fine in chrome and firefox.

    Any help will be appreciated

    Thanks
    reece

  2. #2
    Sencha User
    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


    There were a couple of issues with this in GXT 2.0.1.

    However, the first issue i see in your code is that oyu give the same id to all tooltip. IDs needs to be unique.

  3. #3
    Ext User
    Join Date
    Aug 2010
    Posts
    3
    Vote Rating
    0
    activedecay is on a distinguished road

      0  

    Default


    What is the status of this thread? I have the same problem with cell renderers in IE.

    Thanks,
    Justin

  4. #4
    Sencha User
    Join Date
    Nov 2008
    Location
    Vienna - Austria
    Posts
    867
    Vote Rating
    1
    micgala is on a distinguished road

      0  

    Default


    what version are you using, 2.0.1?
    Probably you should give us some code, demonstrating your problem.

  5. #5
    Ext User
    Join Date
    Aug 2010
    Posts
    3
    Vote Rating
    0
    activedecay is on a distinguished road

      0  

    Default


    gxt-2.1.1, gwt-user-2.0.3

    Code:
    import com.google.gwt.user.client.ui.Anchor;
    
            // Renders the Username column (turns the name into a clickable anchor which will invoke the edit user dialog)
            GridCellRenderer<ModelData> userNameRenderer = new GridCellRenderer<ModelData>() {
                public Object render(ModelData model, String property,  ColumnData config, int rowIndex, int colIndex,  ListStore<ModelData> store, Grid<ModelData> grid) {
                    // associate the Anchor with the model object so we don't have to create a 
                    // new one each time the cell is rendered  
                    Anchor anchor = model.get(USER_NAME_ANCHOR_WIDGET);
                    if (anchor == null) {
                        String val = model.get(property);
                        anchor = new Anchor(val);
                        model.set(USER_NAME_ANCHOR_WIDGET, anchor);
                        anchor.setHref("javascript:;"); // override the default link behavior
                        anchor.addClickHandler(new EditUserHandler(store.getRecord(model)));
                    }
                    return anchor;
                }
            };
    In IE I've found, while debugging, this problematic area of code in GridView.class:

    Code:
      protected void renderWidgets(int startRow, int endRow) {
        if (grid.isViewReady()) {
          if (endRow == -1) {
            endRow = ds.getCount() - 1;
          }
          for (int i = startRow; i <= endRow; i++) {
            List<Widget> m = i < widgetList.size() ? widgetList.get(i) : null;
            if (m != null) {
              for (int j = 0; j < grid.getColumnModel().getColumnCount(); j++) {
                Widget w = j < m.size() ? m.get(j) : null;
                if (w != null) {
                  Element cell = getWidgetCell(i, j);
                  if (cell != null) {
                    if (w.getElement().getParentElement() == null || w.getElement().getParentElement() != cell) {
                      fly(cell).removeChildren();
                      cell.appendChild(w.getElement());
                    }
                    if (grid.isAttached()) {
                      ComponentHelper.doAttach(w);
                    }
                  }
                }
              }
            }
          }
        }
      }
    After clicking sort, events are fired until this code is reached, where w.getElement() is my anchor widget but the innerHTML has been wiped out.

  6. #6
    Sencha User
    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


    Can you try this against 2.2 RC1? If that is not working too, than we will need a fully working testcase that implements EntryPoint

  7. #7
    Ext User
    Join Date
    Aug 2010
    Posts
    3
    Vote Rating
    0
    activedecay is on a distinguished road

      0  

    Default


    Hi Sven,

    Tried this against the latest GXT and the problem is not fixed.

    Problem is still in the same place that I posted where getElement innerHTML is empty.

    GXT 2.2.0

    GWT 2.0.4

  8. #8
    Sencha User
    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


    Than please post a fully working testcase that implements EntryPoint and shows your problem. I never saw this problem and nobody else reported it befor.