0 Replies Latest reply on Sep 17, 2014 11:06 AM by Charles Odili

    Errai UI With Multiple Layouts

    Charles Odili Apprentice

      Is there a way to use more than on layout in an errai app using errai ui ? Consider the following two layouts :

      Login Layout : this features a layout with no header or footer or sidebar, just a SimplePanel to which the Navigation.getContentPanel() is attached to, so that the @Templated LoginView composite is shown as the sole UI view / component.

       

      App Layout : In this layout, the UI needs to have a header, footer, sidebar and content region where Navigation.getContentPanel() goes so that the different application views / screen can be displayed while the header, footer and sidebar are static.

       

      I intend to use the first layout (Login Layout) at first, but switch to the App Layout (second layout), say after authentication. But this has not been possible so far. I used RootPanel.get().clear() to clear the UI, and then RootPanel.get().add(appLayout); to attach the second layout. The outcome is that the same first layout / view (the one that should be cleared) remains there and the new layout / view (app layout) is not attached nor seen.

       

      Has anyone done something similar before. How did it work out.