java.lang.Object
no.ntnu.principes.event.PrincipesEvent<OpenModalEvent.ModalPayload>
no.ntnu.principes.event.navigation.OpenModalEvent
Represents an event for opening a modal within the application.
This event encapsulates the callback identifier and payload information
required to display a modal with specific parameters.
The payload contains details like the target route or identifier and optional parameters that provide additional context for the modal.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents the payload data required to open a modal in the application. -
Constructor Summary
ConstructorsConstructorDescriptionOpenModalEvent(String callbackId, OpenModalEvent.ModalPayload payload) Constructs a newOpenModalEventwith a unique callback identifier and payload containing modal configuration details. -
Method Summary
Modifier and TypeMethodDescriptionstatic OpenModalEventCreates a new instance ofOpenModalEventwith the specified path and callback identifier.static OpenModalEventCreates a newOpenModalEventwith the specified callback identifier and payload.
-
Constructor Details
-
Method Details
-
of
Creates a new instance ofOpenModalEventwith the specified path and callback identifier.- Parameters:
path- the target route or identifier of the modal to be opened.callBackId- the callback identifier associated with the modal event.- Returns:
- a new
OpenModalEventwith the specified path and callback identifier.
-
of
Creates a newOpenModalEventwith the specified callback identifier and payload. The payload includes the target path for the modal and any additional parameters.- Parameters:
path- the target path or route identifier for the modalcallBackId- the unique callback identifier associated with the modal eventparams- a map of key-value pairs representing additional parameters for the modal (can be empty)- Returns:
- a new
OpenModalEventcontaining the specified callback identifier and payload
-