Package dyntabs

Class DynTabCDIEvent

java.lang.Object
dyntabs.DynTabCDIEvent

public class DynTabCDIEvent extends Object
Event object representing a tab lifecycle event in the DynTabs framework.

Supported event types:

  • "dynTabAdded" - fired when a new tab is opened
  • "dynTabRemoved" - fired when a tab is closed
  • "dynTabSelected" - fired when a tab is selected (brought to front)

Events are dispatched by DynTabManager.fireDynTabEvent(dyntabs.DynTabCDIEvent) to all active tabs. Each tab's CDI bean receives the event via BaseDyntabCdiBean.observeDynTabEvent(DynTabCDIEvent).

Note: For "dynTabRemoved" events, the tab reference is null because the bean has already been destroyed before the event is dispatched. Use getTabId(), getUniqueIdentifier(), and getTitle() to access tab metadata in this case.

Author:
DynTabs
See Also:
  • Constructor Details

    • DynTabCDIEvent

      public DynTabCDIEvent(String eventType, DynTab tab)
      Constructor for events where the tab reference still exists (dynTabAdded, dynTabSelected).
      Parameters:
      eventType - the type of event
      tab - the DynTab instance involved in the event
    • DynTabCDIEvent

      public DynTabCDIEvent(String eventType, String tabId, String uniqueIdentifier, String title)
      Constructor for events where the tab reference no longer exists (dynTabRemoved - the bean is destroyed before the event is dispatched). Only the tab metadata is carried.
      Parameters:
      eventType - the type of event
      tabId - the tab's internal ID (e.g. "r0")
      uniqueIdentifier - the tab's unique identifier
      title - the tab's display title
  • Method Details

    • getEventType

      public String getEventType()
    • setEventType

      public void setEventType(String eventType)
    • getTab

      public DynTab getTab()
    • setTab

      public void setTab(DynTab tab)
    • getTabId

      public String getTabId()
    • getUniqueIdentifier

      public String getUniqueIdentifier()
    • getTitle

      public String getTitle()