2 copies of the same web part on one page issue

LabKey Support Forum (Inactive)
2 copies of the same web part on one page issue Nick Kerr  2012-09-14 14:02
Status: Closed
 
Hi Leo,

This might be a race condition between when these files are marked as loaded and another webpart skipping directly to the success function.

The best solution is to declare the set of dependent files as dependencies in the *.view.xml for your webpart. This way those scripts will get loaded when the page is declared, and the document is open.

If you can't do this, you might try using a separate script tag and placing the LABKEY.requiresScript() call in there, but this might still hit the condition.

Thanks,
Nick