public final boolean isAjaxTargeted ( ) { // If the AJAX target is within the dialog, it should be visible. AjaxOperation operation = AjaxHelper . getCurrentOperation ( ) ; if ( operation == null ) { return false ; } String dialogId = getId ( ) ; String containerId = operation . getTargetContainerId ( ) ; if ( containerId != null && containerId . startsWith ( dialogId ) ) { // target is the dialog, or somewhere within the dialog return true ; } if ( operation . getTargets ( ) != null && UIContextHolder . getCurrent ( ) != null ) { for ( String targetId : operation . getTargets ( ) ) { if ( targetId . startsWith ( dialogId ) ) { return true ; } } } return false ; }
Indicates whether the dialog is currently the target of an AJAX operation .