[REVIEW] Allow caller to specify no-arg controller method as an event handler

Richard Bair richard.bair at oracle.com
Tue Dec 13 12:48:02 PST 2011

Ok cool! So how does resolution work if I have both:

	public void doit(ActionEvent e) { }
	public void doit() { }

I assume in this case the more specific method is called?

Slightly different topic, when this is updated the intro to FXML document[1] should be updated as well. Would this changeset also include updates to this documentation? 


[1] http://docs.oracle.com/javafx/2.0/api/javafx/fxml/doc-files/introduction_to_fxml.html

On Dec 13, 2011, at 11:22 AM, Greg Brown wrote:

> This is a review request for RT-18229:
> http://javafx-jira.kenai.com/browse/RT-18229
> In JavaFX 2.0, controller-based event handlers must adhere to the method signature defined by an event handler; in other words, they must accept a single argument of a type that extends Event and return void. This change lifts the argument restriction, making it possible to write a controller event handler that takes no arguments.

More information about the openjfx-dev mailing list