|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Method Summary | |
---|---|
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 . |
DialogContext |
getActiveDialogContext(javax.faces.context.FacesContext context)
Return the currently active DialogContext instance for the
current request, if there is one; otherwise, return null . |
DialogContextManagerListener[] |
getDialogContextManagerListeners()
Return the set of currently registered DialogContextManagerListener s. |
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 . |
Method Detail |
---|
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 created
DialogContext
instance, with no
parent dialog association
IllegalArgumentException
- 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
instance
IllegalArgumentException
- if no dialog definition
can be found for the specified logical name
IllegalStateException
- if the specified parent
instance is not managed by this DialogContextManager
DialogContext get(String id)
Return the DialogContext
instance for the specified identifier
(if any); otherwise, return null
.
id
- Dialog identifier for which to return an instance
DialogContext
instance for this identifier,
may be nullDialogContext getActiveDialogContext(javax.faces.context.FacesContext context)
Return the currently active DialogContext
instance for the
current request, if there is one; otherwise, return null
.
context
- FacesContext
for the current requestvoid 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)
DialogContextManagerListener
for this
DialogContextManager
. Listener cannot be null
.
listener
- The DialogContextManagerListener
instance.DialogContextManagerListener[] getDialogContextManagerListeners()
DialogContextManagerListener
s.
void removeDialogContextManagerListener(DialogContextManagerListener listener)
DialogContextManagerListener
for this DialogContextManager
. The listener will no longer receive
any associated callbacks.
listener
- The DialogContextManagerListener
instance.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |