1 Reply Latest reply on Aug 25, 2014 1:58 PM by Christian Sadilek

    Errai UI inner class Templates

    Aaron Anderson Newbie

      In my application I have come across a common pattern where I have a template for the page, annotated with the @Page annotation and it contains the header, navigation, and footer, and then a second template for the actual main contents of the page that is injected into the corresponding datafield of the page. Since the page template is very simple I would like to create the content template as an inner class of the page template and avoid having two top level class for every logical page. While GWT finds the inner class and the template at the very end of the compilation I get the error "[ERROR] Unable to find type 'org.jboss.errai.ioc.client.BootstrapperImpl.<my package>_client_local_Page.ContentTemplateResource' I presume if the last . was an _ it might find it.


      Are inner class templates supported and if so what am I doing wrong?


      @Page(path = "page")
      public class Page extends MainLayout {
          private PageHeader pageHeader;
          Content pageContent;
              @Templated(LayoutTemplates.BASE + "/PageContent.html")
              public class Content extends Composite {
        • 1. Re: Errai UI inner class Templates
          Christian Sadilek Master

          Hi Aaron,


          I was able to reproduce the problem using static nested classes (which I assume you've been using as well when you got the error). I have pushed a fix for this and deployed new snapshots. So, this should work now (when changing Content to a static nested class) if you upgrade to 3.0.3-SNAPSHOT or 3.1.0-SNAPSHOT.