6 Replies Latest reply on Dec 16, 2013 4:05 AM by Charles Odili

    Errai UI DOM Access & JS Execution Failures ?

    Charles Odili Apprentice

      Like in the errai-tutorial demo, the JS files in my project were included in the index.html file that loads the GWT app, including an app.js JS file that creates drop-down menus (and other twitter bootstrap / jquery plugins). This app.js file uses JQuery to augment the page / DOM and previewing the HTML templates in browser shows that everything works.

      However, when the errai app runs and we go to one of the @Template @Page, some of the JS effects / augmentation are not applied. My guess is that the errai @Template @Page components have not been rendered at that time. How can this be handled?

      Is there a life-cycle method (like @PostConstruct) that gets executed when a @Page has is fully rendered. If there is, then I can call a JSNI method to execute the needed JS. I can also make calls at this point, to mutate the DOM if I so desire.