Radna Odela
Radna Odela

Reputation: 81

how to include one page in another in gwt ui.xml

I want to have some menu on all pages, and my idea is to create one page for that and include it in all other. Is it possible?

Upvotes: 8

Views: 2939

Answers (1)

mabn
mabn

Reputation: 2523

Sure it is. Create your menu (lets say it's com.something.Menu together with Menu.ui.xml), then in the including component:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
    xmlns:g='urn:import:com.google.gwt.user.client.ui'
    xmlns:my='urn:import:com.something'>

  <g:HTMLPanel>
    Hello world!
    <my:Menu />
  </g:HTMLPanel>
</ui:UiBinder>

here is other example

Upvotes: 9

Related Questions