Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6365385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:17:11+00:00 2026-05-25T00:17:11+00:00

I am completely stuck with the creation of a css driven menu in gwt.

  • 0

I am completely stuck with the creation of a css driven menu in gwt. In the rendered result it should look exactly like this:

    <div class="topbar">
                <div class="container fixed">
                    <h3>
                        <a href="" class="logo">test</a>
                    </h3>
        <ul class="nav secondary-nav">
              <li class="menu open">
                <a class="menu" href="#">Dropdown</a>
                <ul class="menu-dropdown">
                  <li><a href="">Secondary link</a></li>
                  <li><a href="">Something else here</a></li>
                  <li class="divider"></li>
                  <li><a href="">Another link</a></li>
                </ul>
              </li>
        </ul>
</div>
</div>

In addition to that I want to get use of the clickhandler in all Hyperlinks and the hover of the link “Dropdown”. I thought about generating different widgets like NavBar, NavBarItem and adding them later programmaticaly to the NavBar widget like navBar.add(“historytoken1”, “Text”) and this will result in appending a li tag with a hyperlink to it etc.

I need the clickhandler for navigation and as well for css manipulation so that I can set some new classes on the li elements.

I am experimenting now almost the whole day on this little widget and I am getting no results as GWT is always putting stupid divs between the li tags or somewhere else. The limitation of using only widgets in flowpanels etc. is also driving me crazy :-).

I am not looking for a finished solution but can somebody giving me a hint how to do this? I mean having ul and li for menu is not that unique 🙂 and I dont understand why Gwt is not supporting this. Maybe I am overseeing something.

BTW- i am trying to incorporate this HTML Bootstrap from here which I really like:

Twitter Boostrap

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:17:11+00:00Added an answer on May 25, 2026 at 12:17 am

    Have you tried using UiBinder? For instance, the following will generate your desired markup. If you wanted to add click handlers to the links, you can specify them as @UiField’s in the GamboMenu class.

    public class GamboMenu extends Composite {
    
                @UiField LIElement menuOpen;
    
        public GamboMenu() {
            initWidget(uiBinder.createAndBindUi(this));
                        menuOpen.getStyle().setDisplay(Display.NONE);
        }
    
        GamboMenuUiBinder uiBinder = GWT.create(GamboMenuUiBinder.class);
    
        interface GamboMenuUiBinder extends UiBinder<Widget, GamboMenu> {
        }
    }
    

    And the corresponding UiBinder file:

    <!-- <!DOCTYPE ui:UiBinder SYSTEM "http://dl.google.com/gwt/DTD/xhtml.ent"> -->
    <ui:UiBinder xmlns:ui="urn:ui:com.google.gwt.uibinder"
        xmlns:g="urn:import:com.google.gwt.user.client.ui"
        >
    
        <g:HTMLPanel styleName="topbar">
            <div class="container fixed">
                  <h3><a href="" class="logo">test</a></h3>
                <ul class="nav secondary-nav">
                        <li ui:field="menuOpen" class="menu open">
                        <g:InlineHyperlink styleName="menu">Dropdown</g:InlineHyperlink>
                        <ul class="menu-dropdown">
                          <li><g:InlineHyperlink>Secondary link</g:InlineHyperlink></li>
                          <li><g:InlineHyperlink>Something else here</g:InlineHyperlink></li>
                          <li class="divider"></li>
                          <li><g:InlineHyperlink>Another link</g:InlineHyperlink></li>
                        </ul>
                        </li>
                </ul>
            </div>
        </g:HTMLPanel>
    
    </ui:UiBinder>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I haven't been doing this for long but I'm completely stuck on this.
I am completely stuck on this issue so your help is greatly appreciated! I
I am completely stuck. This is my incomplete program. The program gets stuck at
I am completely stuck with this: I start out with a flat file type
I've done some jQuery in the past, but I am completely stuck on this.
Hello everyone I am completely stuck with this problem. I want add the name
I am completely stuck on this one. I know my code is correct. It
I post this here as a last resort. I'm completely stuck and do not
I am completely stuck with this problem I'm having with excel. Basically I am
I'm completely stuck and need your help... I've created a webservice stub with jaxb

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.