Package dyntabs

Class ApplicationCDIEvent

java.lang.Object
dyntabs.ApplicationCDIEvent

public class ApplicationCDIEvent extends Object
Event object used for inter-tab (application module) communication.

Tabs in DynTabs can send messages to each other using this event. Each tab is identified by its uniqueIdentifier, which serves as the sender/target address. The event carries an optional payload object that can be any application-specific data.

Events are dispatched by DynTabManager.fireApplicationEvent(ApplicationCDIEvent) which iterates through all active tabs and delivers the event directly (bypassing CDI @Observes due to @TabScoped limitations).

Special event types:

  • "JobFlowReturn" - signals that a child tab is returning a value to its caller tab (workflow completion pattern)
Author:
DynTabs
See Also:
  • Constructor Details

    • ApplicationCDIEvent

      public ApplicationCDIEvent(String senderAppModuleId, String targetAppModuleId, Object payload)
      Creates an event without an explicit event type.
      Parameters:
      senderAppModuleId - uniqueIdentifier of the tab that fires the event
      targetAppModuleId - uniqueIdentifier of the tab that should receive the event (null to broadcast to all tabs)
      payload - arbitrary data object to send with the event
    • ApplicationCDIEvent

      public ApplicationCDIEvent(String eventType, String senderAppModuleId, String targetAppModuleId, Object payload)
      Creates an event with an explicit event type.
      Parameters:
      eventType - the type of event (e.g. "JobFlowReturn")
      senderAppModuleId - uniqueIdentifier of the tab that fires the event
      targetAppModuleId - uniqueIdentifier of the tab that should receive the event (null to broadcast to all tabs)
      payload - arbitrary data object to send with the event
  • Method Details

    • getSenderAppModuleId

      public String getSenderAppModuleId()
    • getTargetAppModuleId

      public String getTargetAppModuleId()
    • getPayload

      public Object getPayload()
    • getEventType

      public String getEventType()