java.lang.Object
io.github.mmm.ui.api.controller.UiPlace
All Implemented Interfaces:
io.github.mmm.ui.api.attribute.AttributeReadId

public final class UiPlace extends Object implements io.github.mmm.ui.api.attribute.AttributeReadId
A place identifies a UiController in combination with its parameters. It allows to represent a specific state of the client that can be bookmarked and reopened at a later point in time.
HINT:
For each of your UiController you need to define an ID. To decouple your navigation from the actual UiController implementations, it is recommended to define them as constants in a places class per component or module. UiControllers may have mandatory or optional parameters. Therefore, it is recommended to create factory methods for your UiPlaces in the places class defining the constants that take the parameter values as properly typed arguments. This will make refactoring easier if parameters need to be changed. For generic access to your parameters please also define PARAMETER_* constants in your places class.
 public final class ExamplePlaces {

  private ExamplePlaces() {}

  public static final String ID_ADDRESS = "address";

  public static final String PARAMETER_ID = "id";

  public static UiPlace placeAddress(long id) {
    return UiPlace.of(ID_ADDRESS, PARAMETER_ID, id);
  }

  public static void navigateAddress(long id) {
    UiPlace place = placeAddress(id);
    UiNavigationManager.get().navigateTo(place);
  }

 
Since:
1.0.0