• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

How to register same event handler with two widgets?

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am kind of new to GWT. As a part of learning, I tried to create a StateCityCombo widget that comprises of state and city list boxes. If I register ChangeEvent handler with each, the compiler gives an error.

Relevant code:

@UiHandler ("stateCB")
public void onChange (ChangeEvent event)
{
...
}

If I try to register ChangeEvent handler with the city list box as:

@UiHandler ("cityCB")
public void onChange (ChangeEvent event)
{
...
}

The compiler complains about duplicate declaration of onChange. How can I register same signature event handler with two different widgets?

Thanks in advance for your help.

Regards,
- Roger
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!