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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T08:07:45+00:00 2026-05-20T08:07:45+00:00

Assuming the following *.ui.xml file: <ui:UiBinder xmlns:ui=’urn:ui:com.google.gwt.uibinder’ xmlns:g=’urn:import:com.google.gwt.user.client.ui’> <g:VerticalPanel> <g:Label ui:field=Label1></g:Label> <g:Label ui:field=Label2></g:Label> <g:Label

  • 0

Assuming the following *.ui.xml file:

<ui:UiBinder xmlns:ui='urn:ui:com.google.gwt.uibinder'
        xmlns:g='urn:import:com.google.gwt.user.client.ui'>
<g:VerticalPanel>
    <g:Label ui:field="Label1"></g:Label>
    <g:Label ui:field="Label2"></g:Label>
    <g:Label ui:field="Label3"></g:Label>
</g:VerticalPanel>

If I now want to add ClickHandlers to all three Labels like this:

@UiHandler("Label1")
void handleClick(ClickEvent event) {
    //do stuff
}
@UiHandler("Label2")
void handleClick(ClickEvent event) {
    //do stuff
}
@UiHandler("Label3")
void handleClick(ClickEvent event) {
    //do stuff
}

I get an error, because I have 3 methods with the same name. Is there a way around this, other than creating custom widgets and add those to the VerticalPanel?

  • 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-20T08:07:45+00:00Added an answer on May 20, 2026 at 8:07 am

    Just name them different things. The important part that helps GWT recognize what kind of event you want to handle is the ClickEvent, but the method name doesn’t matter.

    @UiHandler("Label1")
    void handleClickForLabel1(ClickEvent event) {
        //do stuff
    }
    
    @UiHandler("Label2")
    void handleClickForLabel2(ClickEvent event) {
        //do stuff
    }
    
    @UiHandler("Label3")
    void whoaSomeoneClickedLabel3(ClickEvent event) {
        //do stuff
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

assuming I got following XML file : <?xml version=1.0 encoding=ISO-8859-1 ?> <MyCarShop> <Car gender=Boy>
Assuming I have a sample configuration XML file that is the following: <?xml version=1.0?>
Assuming you have the following XML: <?xml version=1.0 encoding=utf-8?> <content> <info> <media> <image> <info>
Assuming the following domain entity : public enum Role { User = 0, Moderator
Given the following xml document (assuming more books then actually listed) and using the
Assuming the following text file, which is actually a data dump of funds and
Assuming the following table: USER COLOR ORDER ================== JOE RED 1 JOE BLUE 2
assuming that I have following xml: <ns5:OrderTotal> <ns5:Name>AmountPaid</ns5:Name> <ns5:Description>Payment Received</ns5:Description> <ns5:SortOrder>4</ns5:SortOrder> <ns5:Value>16.95</ns5:Value> </ns5:OrderTotal> <ns5:OrderTotal>
Assuming an XML file with unknown structure (i.e., unknown element and attribute names), like
I have something like the following (shown below) defined in my styles.xml file. But

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.