Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    TileGrid No Redraw On Data Edit

    Using Chrome with Smart GWT 2.5

    Currently I'm working on a TileGrid of custom objects. I achieved this by creating a custom TileGrid and overriding the getTile method which then builds a custom type of tile (in the form of a canvas) which includes data about the object it represents and a context menu.

    The context menu is generated via a static MenuFactory (since we use the same menu on these objects in other contexts). The edit item in my menu pops up a window with a dynamic form, the dynamic form is passed the DataSource object that the TileGrid uses. When I use the dynamic form to edit my object, the data is in fact changed on the server but the old data item remains drawn on the custom tile (basically showing both versions of the object at once). Refreshing the page completely shows the new data and not the old, so I know the data has been changed properly.

    Essentially changing data for some reason doesn't redraw the tile. I have tried to call redraw from many different contexts and none of them seem to remove the problem.

    Any ideas? Or do you need more information?

    Thanks

    #2
    A little bit more information.

    When I use the default DetailViewer (ie. I don't change it), I get the expected behavior from the default DetailViewer element (without the expected look and feel). The other elements that I've custom built into my getTile method (via addChild) don't update correctly.

    Clearly it has something to do with my custom elements which are added via addChild in my getTile override, but I don't know why or how to fix the problem. Any ideas?

    Comment


      #3
      Take a look at the FAQ on grids not updating - it lists out the reasons why automatic refresh may not occur, and how to troubleshoot.

      Comment

      Working...
      X