2 Replies Latest reply on Jan 22, 2015 4:03 AM by Charles Odili

    I Need Bootstrap's Modals In Errai?

    Charles Odili Apprentice

      Besides displaying content within the NavigationPanel, I now need to also show modals in my app (just for variety in the UI). Since I am already using Bootstrap, I felt like using its Modal. Borrowing from code in the overlord-commons repo (http://goo.gl/lX9Zxr) I create a ModalDialog and SampleDialog java classes but keep running into the following error when I attempt to us it : SEVERE [LogConfiguration] Exception caught: (TypeError) : Cannot read property 'add_205_g$' of undefined. This error is triggered in the show() method of the ModalDialog class where is tries to add the widget to the RootPanel with rootPanel.add(this);

      The code paste is here, kindly have a look : http://pastebin.com/xJJYtwc3

        • 1. Re: I Need Bootstrap's Modals In Errai?
          Michael Anstis Newbie

          Why not use GWT-Bootstrap's Modal?


          Otherwise you may get less help here (an Errai forum) than asking (effectively) how to wrap a JavaScript library with GWT (as Errai is based on GWT).

          1 of 1 people found this helpful
          • 2. Re: I Need Bootstrap's Modals In Errai?
            Charles Odili Apprentice

            Thanks Michael, but I believe this question can be taken as a valid candidate here (an Errai forum) since we are kinda used to (from examples and docs) doing UIs that use the NavigationPanel. Once you want to do something outside that, like using a Modal window containing a @Templated widget (or say a @Templated modal window, whichever is easier to understand and implement), then you are on your own figuring things out for yourself. If people here (using Errai) may have faced and solved the same problem, then they can share some info on how they did it. So its majorly a GWT / JSNI problem, but it will help if Errai users have done this, which I believe many have.


            Thanks again.