I've been chasing a Place-related problem for at least one hour - and
I found that the DefaultPlaceManager disallows registering more than
one place per class. In my application, I have a parametrized Place
class which takes an entity class key to determine what presenter to
display.
The code in question is below.
public boolean registerPlace( Place place ) {
if ( !placeMap.containsKey( place.getClass() ) ) {
place.addHandlers( eventBus );
placeMap.put( place.getClass(), place );
return true;
}
return false;
}
My question is what is the purpose of this piece of code? If it is to
guard against multiple registrations, couldn't a HashSet simply
contain all presenters? By default, we can set the equals / hashCode
methods of Place to delete to the class instance, so we would gain
nothing.
Thanks,
Robert
Robert
--
Sent from my (old) computer
Thoughts?
Robert