Package dyntabs
Class DynTabCDIEvent
java.lang.Object
dyntabs.DynTabCDIEvent
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 Summary
ConstructorsConstructorDescriptionDynTabCDIEvent(String eventType, DynTab tab) Constructor for events where the tab reference still exists (dynTabAdded, dynTabSelected).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). -
Method Summary
Modifier and TypeMethodDescriptiongetTab()getTabId()getTitle()voidsetEventType(String eventType) void
-
Constructor Details
-
DynTabCDIEvent
Constructor for events where the tab reference still exists (dynTabAdded, dynTabSelected).- Parameters:
eventType- the type of eventtab- the DynTab instance involved in the event
-
DynTabCDIEvent
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 eventtabId- the tab's internal ID (e.g. "r0")uniqueIdentifier- the tab's unique identifiertitle- the tab's display title
-
-
Method Details
-
getEventType
-
setEventType
-
getTab
-
setTab
-
getTabId
-
getUniqueIdentifier
-
getTitle
-