tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Shead (JIRA)" <j...@apache.org>
Subject [jira] Created: (TAP5-1202) onActviate called in wrong order
Date Wed, 07 Jul 2010 14:11:49 GMT
onActviate called in wrong order

                 Key: TAP5-1202
                 URL: https://issues.apache.org/jira/browse/TAP5-1202
             Project: Tapestry 5
          Issue Type: Bug
          Components: tapestry-core
    Affects Versions: 5.2
            Reporter: Mark Shead
            Priority: Minor


Quote from Howard:
When a single method is overloaded with different parameters, the order of invocation is fewest
parameters to most parameters.

So onActivate() will be invoked before onActivate(String, String).
End Quote

This doesn't appear to be the case. Based on:

	void onActivate(Contact contact, Address address) {
		System.out.println("Calling onActivate with 2 parameters");
		this.contact = contact;
		this.address = address;
	void onActivate(Contact contact) {
		System.out.println("Calling onActivate with 1 parameter");
		this.contact = contact;
		this.address = new Address();

Calling onActivate with 2 parameters
Calling onActivate with 1 parameter

The order described in the blog post would be preferred because it allows you to write multiple
versions of onActivate and know that the last one called with be the best match.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message