Announcement

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

    To check when Listgrid is loaded

    Smartclient version 10.0

    Hello,
    I need to measure the performance of some changes I've done to a ListGrid and for that I would like to know if there is an API that would be called when the grid is fully loaded.

    #2
    This question is a bit vague - we'll assume that by "fully loaded" you meant that the initial data fetched from the server has arrived.

    If you are loading data via fetchData(), use the callback.

    If you aren't calling fetchData() directly, the dataArrived event can be used.

    Comment


      #3
      The SmartClientWebDriver for selenium has a waitForGridDone() - https://www.smartclient.com/smartgwtee/server/javadoc/com/isomorphic/webdriver/SmartClientWebDriver.html#waitForGridDone(org.openqa.selenium.By).

      If it's using the selenium defaults, it will poll every 500ms. If that resolution is good enough for you, that might be a way to check this repeatedly and programmatically, without modifying your code.

      If you need higher resolution, you would need to figure out how the waitForGridDone works under the hood, and do the same thing but with a FluentWait instead (https://selenium.googlecode.com/git/docs/api/java/org/openqa/selenium/support/ui/FluentWait.html) where you can control the polling interval. Or skip selenium and use a different method, such as calculating the time, say by overriding initWidget to get the start time, and the method Isomorphic suggested to get the end time, and then logging the difference to the console.

      Comment

      Working...
      X