File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes GWT and the fly likes How to register same event handler with two widgets? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » GWT
Bookmark "How to register same event handler with two widgets?" Watch "How to register same event handler with two widgets?" New topic
Author

How to register same event handler with two widgets?

Roger Larry
Greenhorn

Joined: Jan 30, 2013
Posts: 2
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
 
Consider Paul's rocket mass heater.
 
subject: How to register same event handler with two widgets?
 
Similar Threads
ChangeListener problem
problem with calling jsp page on evenet onSelect/onClick
If JavaScript is disabled, how to listen events?
howto ensure event handler finish task
register KeyDownHandler on VerticalPanel