Package org.eclnt.jsfserver.managedbean
Interface IDispatcher
- All Known Subinterfaces:
IWorkpageDispatcher
- All Known Implementing Classes:
CCTDDispatcher
,DefaultDispatcher
,WorkpageDispatcher
Interface of a dispatcher that manages managed bean objects in
the following way: for each managed bean class one object is
kept.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkIfDispatchedBeanIsLoaded
(Class dispatchedBeanClass) boolean
checkIfDispatchedBeanIsLoaded
(String dispatchedBeanName) Create a modal popup instance within the workpage context.Create a modeless popup instance within the workpage context.int
A dispatcher may have other dispatchers below.void
destroy()
Destroys the dispatcher and its contained objects.Returns a list of child dispatchers - if the dispatcher is hierarchized.Returns the content replace statement that is passed to included pages.getDispatchedBean
(Class dispachtedBeanClass) Find managed bean for class.getDispatchedBean
(String dispatchedBeanName) Find managed bean for name.Each dispatcher is the entry point to its managed beans.getMyExpression
(Class cl) Returns the expression for the object that is managed inside the dispatcher.Returns the expression for the object that is managed inside the dispatcher.getOwner()
Passes back the dispatcher above.Passes back the top owner of the dispatcher hierarchy.void
removeDispatchedBean
(Class dispatchedBeanClass) Removes dispatched bean from dispatcher.void
removeDispatchedBean
(String dispatchedBeanName) Removes dispatched bean from dispatcher.void
setOwner
(IDispatcher owner) void
unregisterSubDispatcherInstance
(IDispatcher subDispatcher) updateExpression
(String expression) Within the bean processing you may create components in a dynamic way, e.g. using the feature "componentbinding".Methods inherited from interface java.util.Map
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
Method Details
-
getDispatchedBean
Find managed bean for class. If the bean already exists then the bean is returned. If it does not exist yet then a new instance will be created. -
removeDispatchedBean
Removes dispatched bean from dispatcher. -
getDispatchedBean
Find managed bean for name. If the bean already exists then the beans is returned. If it does not exist yet then a new instance will be created.- Parameters:
dispatchedBeanName
- Name of the beans - this is the name that is used for binding the bean within the user interface, as well. E.g. if the bean's binding is "#{d.AbcdeUI. ...} then you may access the bean by passing "AbcdeUI".
-
removeDispatchedBean
Removes dispatched bean from dispatcher. -
getExpressionBase
String getExpressionBase()Each dispatcher is the entry point to its managed beans. Dispatchers themselves may be nested. This method returns the expression of this dispatcher instance. -
createSubDispatcherInstance
IDispatcher createSubDispatcherInstance()A dispatcher may have other dispatchers below. This method creates a sub dispatcher. -
destroy
void destroy()Destroys the dispatcher and its contained objects. -
updateExpression
Within the bean processing you may create components in a dynamic way, e.g. using the feature "componentbinding". When assigning expression to component you need to pay attention that the binding fits to the dispatcher environment in which your bean resides.
This method builds an expression that is relative to the current dispatcher.- Parameters:
expression
- The normal expression, e.g. "#{d.Car}".- Returns:
- The relative expression, e.g. "#{d.d_1.Car}".
-
getContentReplace
String getContentReplace()Returns the content replace statement that is passed to included pages. Returns a value like "#{d.:#{d.d_1.". -
getMyExpression
Returns the expression for the object that is managed inside the dispatcher.- Returns:
- Expression of object: "#{d.xyz}"
-
getMyExpression
Returns the expression for the object that is managed inside the dispatcher.- Returns:
- Expression of object: "#{d.xyz}"
-
getOwner
IDispatcher getOwner()Passes back the dispatcher above. Null is returned if the current instance is the top dispatcher -
getTopOwner
IDispatcher getTopOwner()Passes back the top owner of the dispatcher hierarchy. If the current dispatcher is the top owner itself, then the current dispatcher is returned. -
createModalPopup
ModalPopup createModalPopup()Create a modal popup instance within the workpage context. -
createModelessPopup
ModelessPopup createModelessPopup()Create a modeless popup instance within the workpage context. -
setOwner
-
unregisterSubDispatcherInstance
-
createSubDispatcherIndex
int createSubDispatcherIndex() -
getChildDispatchers
List<IDispatcher> getChildDispatchers()Returns a list of child dispatchers - if the dispatcher is hierarchized. -
checkIfDispatchedBeanIsLoaded
-
checkIfDispatchedBeanIsLoaded
-