|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.ui.api.location.LocationChangeRequestedEvent
public class LocationChangeRequestedEvent
Event fired when a location change is about to happen usually in response to user interaction. Handlers can call
setWarning(String)
to request that the user be prompted to confirm the change.
Nested Class Summary | |
---|---|
static interface |
LocationChangeRequestedEvent.Handler
Handler interface for LocationChangeRequestedEvent . |
Constructor Summary | |
---|---|
LocationChangeRequestedEvent(Location newLocation)
|
Method Summary | |
---|---|
void |
dispatch(LocationChangeRequestedEvent.Handler handler)
|
Location |
getNewLocation()
Returns the location we may navigate to, or null on window close. |
String |
getWarning()
Returns the warning message to show the user before allowing the location change, or null if none has been set. |
void |
setWarning(String warning)
Set a message to warn the user that it might be unwise to navigate away from the current location, i.e. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LocationChangeRequestedEvent(Location newLocation)
Method Detail |
---|
public Location getNewLocation()
public String getWarning()
public void setWarning(String warning)
Calling with a null warning is the same as not calling the method at all -- the user will not be prompted.
Only the first non-null call to setWarning has any effect. That is, once the warning message has been set it cannot be cleared.
public void dispatch(LocationChangeRequestedEvent.Handler handler)
dispatch
in interface info.magnolia.event.Event<LocationChangeRequestedEvent.Handler>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |