1

I would like to know if it is possible to use complex gwt widgets like MenuBar or TabLayoutPanel in errai ui.

For example, how can I port the following uibinder to errai's ui template?

<g:MenuBar ui:field="menuBar">
    <g:MenuItem ui:field="helpMenuItem">Help</g:MenuItem>
    <g:MenuItem ui:field="aboutMenuItem">About</g:MenuItem>
    <g:MenuItem ui:field="siteMapMenuItem">Site Map</g:MenuItem>
</g:MenuBar>

I think I could use a <div> in the template, and bind it to a MenuBar, but I would have to construct the menu items programmatically in the view, which I want to avoid.

Thanks!

mendieta
  • 3,470
  • 2
  • 20
  • 23

1 Answers1

1

You have to construct the menu and its items programmatically if you want to stick only with Errai UI. However you could put the menu in a separate widget which could be built with UI-Binder.

GWT's UI-Binder can represent Widgets as well as DOM elements whereas Errai UI only works with a DOM.

Johannes Barop
  • 7,323
  • 2
  • 25
  • 33
  • 1
    Thank you for your answer, what you say is true.. I ended up using a mixed approach, erraiui and programming widgets when needed (for example celltable). I also asked this question in errai forum and got this answer https://developer.jboss.org/thread/249243 – mendieta Nov 19 '14 at 22:55