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 6606041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:21:14+00:00 2026-05-25T19:21:14+00:00

I essentially have a menu where you can’t click the headers, but when you

  • 0

I essentially have a menu where you can’t click the headers, but when you hover over the menu item you can select from the drop down elements. Each of the elements are g:Anchor tags with ui fields associated to them. What I would expect to happen, is that when a user clicks on one of the drop down elements, my uiHandler for that field would fire. Even with debugging on and a break point it doesn’t ever hit.

Below you will find the main areas of concern in the code. I will only post my gwt imports in here, since it can be assumed the rest are correct due to zero errors.

Here is an XML snippet to get an idea of what is going on

<!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'
             xmlns:cpcw='urn:import:org.collegeboard.pa.gwt.client.widget'>
    <cpcw:ExtendedHTMLPanel>
        <ul>
            <li ui:field="juniorHigh"><g:Anchor href="">Junior High</g:Anchor>
            <ul>
                <li><g:Anchor href="#" ui:field="juniorHighFall">Fall</g:Anchor></li>
                <li><g:Anchor href="#" ui:field="juniorHighSpring">Spring</g:Anchor></li>
                <li><g:Anchor href="#" ui:field="juniorHighSummer">Summer</g:Anchor></li>
            </ul>
        </li>
    </ul>
    </cpcw:ExtendedHTMLPanel>
</ui:UiBinder>

And then here are the pieces from my Java class

imports

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.LIElement;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.uibinder.client.UiHandler;
import com.google.gwt.user.client.ui.Anchor;

Ui Fields

@UiField
protected LIElement juniorHigh;

@UiField
protected Anchor juniorHighFall;

@UiField
protected Anchor juniorHighSpring;

@UiField
protected Anchor juniorHighSummer;

Ui Handler

@UiHandler({"juniorHighFall","juniorHighSpring","juniorHighSummer"})
public void handleMenuClick(ClickEvent event)
{
    DisplayUtil.displayAlertMessage(event.toString());
}

Initialize

@Override
public void initializeBinder()
{
    initWidget(ourUiBinder.createAndBindUi(this));
}

Now, the UiHandler never actually gets hit. I have had the g:Anchor tags with and without the href, and also have tried them as g:Hyperlink and g:Button with no success. It is as if the UiHandler isn’t even there.

Any help would be greatly appreciated, and also if you feel you would need anything else for troubleshooting, please let me know!!

Thanks 🙂

EDIT:

Just to make sure that this was clear, the template ui.xml file that contained this ui.xml file was placing this in a div. When I replaced that with a SimplePanel, everything worked with the UiHandler.

Thanks for the responses!

  • 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-25T19:21:14+00:00Added an answer on May 25, 2026 at 7:21 pm

    This does and should work as you have it by default.

    I’ve noticed:

    • Your code references “ourUiBinder”
    • Your controls are wrapped in a “ExtendedHTMLPanel”

    These seem like custom classes – perhaps something funky is going on in those implementations?

    Maybe you can try wrapping those anchors in a SimplePanel and using the default UiBinder and see if that works. If it does, chances are it’s something to do with any custom controls you use. If it doesn’t then something strange is going on – maybe restart your IDE etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a user control which is essentially a main menu. I can place
I have a menu being built via a multi-dimensional array. A current item is
I have a simple fiddle set up that attempts to illustrate this, but essentially
If you have to use String.Replace() to replace test 50 times, you essentially have
Essentially I have a method of a class called killProgram, which is intended to
I have essentially a survey that is shown, and people answer questions a lot
I have essentially the same problem discussed here: http://khason.net/blog/dependency-property-getters-and-setters-in-multithreaded-environment/ public static readonly DependencyProperty MyPropertyProperty
I'm trying to build a Hibernate layer for a database schema I have essentially
I am currently trying to manipulate a unordered list with jQuery, essentially I have
I have two essentially separate applications for configuring two pieces of hardware sold by

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.