public interface DialogContextManager
Management functions for the DialogContext instances related
to a particular user's session.
IMPLEMENTATION NOTE - Implementations of this interface will be stored in session scope, so they should be serializable.
| Modifier and Type | Method and Description |
|---|---|
void |
addDialogContextManagerListener(DialogContextManagerListener listener)
Register given
DialogContextManagerListener for this
DialogContextManager. |
DialogContext |
create(javax.faces.context.FacesContext context,
String name)
Create a new instance of the specified dialog configuration, returning
the newly created instance.
|
DialogContext |
create(javax.faces.context.FacesContext context,
String name,
DialogContext parent)
Create a new instance of the specified dialog configuration, returning
the newly created instance.
|
DialogContext |
get(String id)
Return the
DialogContext instance for the specified identifier
(if any); otherwise, return null. |
DialogContextManagerListener[] |
getDialogContextManagerListeners()
Return the set of currently registered
DialogContextManagerListeners. |
void |
remove(DialogContext instance)
Remove the specified
DialogContext instance from the set of
active instances for the current user. |
void |
removeDialogContextManagerListener(DialogContextManagerListener listener)
Remove this previously registered
DialogContextManagerListener
for this DialogContextManager. |
DialogContext create(javax.faces.context.FacesContext context, String name)
Create a new instance of the specified dialog configuration, returning
the newly created instance. This instance must contain an
id value that is guaranteed to be unique among all active
instances for the current user. The instance must also have been stored
as a request scope attribute under key Constants.INSTANCE_BEAN.
The new instance will not be associated with any parent instance.
context - FacesContext for the current requestname - Logical name of the dialog to be createdDialogContext instance, with no
parent dialog associationIllegalArgumentException - if no dialog definition
can be found for the specified logical nameDialogContext create(javax.faces.context.FacesContext context, String name, DialogContext parent)
Create a new instance of the specified dialog configuration, returning
the newly created instance. This instance must contain an
id value that is guaranteed to be unique among all active
instances for the current user. The instance must also have been stored
as a request scope attribute under key Constants.INSTANCE_BEAN.
The new instance will be associated with the specified parent instance,
which must be managed by this DialogContextManager and therefore
belong to the same user.
IMPLEMENTATION NOTE - Applications should generally
not call this method directly, because it will be awkward to associate
the newly created DialogContext instance with a different view
instance. Instead, this method is primarily intended to support the
ability to automatically associate the DialogContext for, say,
a pop-up window with the DialogContext of the corresponding
main window. This facility is supported automatically by the phase
listener that manages saving and restoring the association of a
DialogContext and its corresponding JSF view.
context - FacesContext for the current requestname - Logical name of the dialog to be executedparent - Parent DialogContext with which the new instance
will be assocated (if any)DialogContext instanceIllegalArgumentException - if no dialog definition
can be found for the specified logical nameIllegalStateException - if the specified parent
instance is not managed by this DialogContextManagerDialogContext get(String id)
Return the DialogContext instance for the specified identifier
(if any); otherwise, return null.
id - Dialog identifier for which to return an instanceDialogContext instance for this identifier,
may be nullvoid remove(DialogContext instance)
Remove the specified DialogContext instance from the set of
active instances for the current user.
instance - DialogContext instance to be removedvoid addDialogContextManagerListener(DialogContextManagerListener listener)
listener - The DialogContextManagerListener instance.DialogContextManagerListener[] getDialogContextManagerListeners()
DialogContextManagerListeners.void removeDialogContextManagerListener(DialogContextManagerListener listener)
DialogContextManagerListener
for this DialogContextManager. The listener will no longer receive
any associated callbacks.listener - The DialogContextManagerListener instance.Copyright © 2004-2013 Apache Software Foundation. All Rights Reserved.