AdfAutoDismissallManager keeps track of all visible popups that have some form of autodismiss behavior. When a popup is shown, by calling somePeer.showPopup(component, contentDom, hints), the Id of the component is pushed onto a stack (except for popups with a AUTO_DISMISS_NEVER hint). The component is then said to be the 'owner' or the 'spawner' of the popup. The reason why the datastructure is a stack is that you might want to have one popup spawn the next, which are then opened and closed in recursive fashion. (see: AdfAutoDismissallManager.addBehavior() and AdfAutoDismissallManager._addComponent() ) However, just before the requested popup has it's owner's ID pushed onto the stack, the AutoDismissalManager unwinds the stack to close any other open popups, i.e. they are auto-dismissed one-by-one, unless the event target was inside the popup DOM or unless some special condition is true. This, w/o the special condition, is the default autodismiss behavior (i.e. AUTO_DISMISS_ALWAYS) but sometimes you want to make an exception, i.e. not dismiss, as for instance, in the case of menus. A submenu should't be dismissed if the item that spawned it is clicked. This is exactly what AUTO_DISMISS_MENU does. So to summarize the distinction: - AUTO_DISMISS_ALWAYS: dismiss unless event target was inside the popup DOM - AUTO_DISMISS_MENU: dismiss unless the event target was inside the popup DOM or the event target was inside the owner's DOM.

Field Detail

_componentStack

Constructor Detail

AdfAutoDismissalManager

public AdfAutoDismissalManager()

AdfAutoDismissallManager keeps track of all visible popups that have some form of autodismiss behavior. When a popup is shown, by calling somePeer.showPopup(component, contentDom, hints), the Id of the component is pushed onto a stack (except for popups with a AUTO_DISMISS_NEVER hint). The component is then said to be the 'owner' or the 'spawner' of the popup. The reason why the datastructure is a stack is that you might want to have one popup spawn the next, which are then opened and closed in recursive fashion. (see: AdfAutoDismissallManager.addBehavior() and AdfAutoDismissallManager._addComponent() ) However, just before the requested popup has it's owner's ID pushed onto the stack, the AutoDismissalManager unwinds the stack to close any other open popups, i.e. they are auto-dismissed one-by-one, unless the event target was inside the popup DOM or unless some special condition is true. This, w/o the special condition, is the default autodismiss behavior (i.e. AUTO_DISMISS_ALWAYS) but sometimes you want to make an exception, i.e. not dismiss, as for instance, in the case of menus. A submenu should't be dismissed if the item that spawned it is clicked. This is exactly what AUTO_DISMISS_MENU does. So to summarize the distinction: - AUTO_DISMISS_ALWAYS: dismiss unless event target was inside the popup DOM - AUTO_DISMISS_MENU: dismiss unless the event target was inside the popup DOM or the event target was inside the owner's DOM.

_cancelTimeoutDismissalBehavior

A popup dismissal behavior for the noteWindow. This dismissal behavior is activated using the AdfDhtmlPopupWindow.HINT_AUTODISMISS_TIMEOUT. The cancel timeout is called when the user mouse overs the content of the popup. The timeout dismisal is canceled and changes to the note window default, AdfDhtmlPopupWindow.HINT_AUTODISMISS_MENU.

changeBehavior

Changes the dismissal behavior of a component. Note that you should not be using this method to set autodismiss behavior to HINT_AUTODISMISS_NEVER. If that is your desire, remove the item from the array instead.

closeAll

dismiss

Iterate over the components under dismissal management. Invoke _cancelDismissal for each component. If dismisal is not cancled, one of two dismissal behaviors are invoked (_hideDismissalBehavior, _inactivateDismissalBehavior). The behavior are determined when initially added based on the dismissal type.

_dismissOnMouseOver

Invoked by the _handleMouseOverTimeout when catching a mouse over event. Invokes cancleDismissal for each component like the dismiss function but only for components registered with the AdfDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT dismissal type.

_hideDismissalBehavior

A popup dismissal behavior for most types of popups. This dismissal behavior is activated using the AdfDhtmlPopupWindow.HINT_AUTODISMISS_MENU, AdfDhtmlPopupWindow.HINT_AUTODISMISS_ALWAYS, and AdfDhtmlPopupWindow.HINT_AUTODISMISS_MOUSEOUT dismissal type. This dismissal behavior hides the popup and deregisters from the dismissal service. If the managed components are empty after deregistration, the event listeners on the document and body are unregistered.

_inactivateDismissalBehavior

A popup dismissal behavior for dialogs and panelWindows only. This dismissal behavior is activated using the AdfDhtmlPopupWindow.HINT_AUTODISMISS_INACTIVATE dismissal type. If the dismissing dialog is the active dialog, change its state to inactive. The dalog/panelWindow activity is managed by the AdfDhtmlDialogManager service.

_timeoutDismissalBehavior

Called for the AdfDhtmlPopupWindow.HINT_AUTODISMISS_TIMEOUT behavior. The timeout period is defined by the "autoDismissalTimeout" property of the noteWindow and passed as a hint during registration. This timeout period will be canceled if the user mouse over the content of the popup.

_undismissDueToActiveIframe

Invoked by the _dismissBlurringElement when catching a dismiss from a user moving focus into an iframe (e.g. richTextEditor or inlineFrame). Since blur events don't tell you where the focus was moved to and since we cannot have access to the iframe contents, we can only look at the document's activeElement (if supported, not supported in Firefox 2).