public class JSFViewManager extends AbstractViewManager
DMXViewManager
for use in JSF applications. This implementation provides support
for handling JSF-specific views.adapter, localeListeners, registeredViews
PARAM_DIALOG_TITLE, PARAM_PROGRESS_DIALOG, PARAM_VIEW_STATE, VAL_DLG_CLOSE, VAL_DLG_SHOW
Constructor and Description |
---|
JSFViewManager() |
Modifier and Type | Method and Description |
---|---|
void |
blockGui(boolean state,
GUIBlockingScope scope,
String... ids)
Block or unblock GUI based on specified parameters.
|
<T extends DialogFactory> |
getDialogFactory()
Retrieves dialog factory for the underlying platform.
|
void |
handleLocaleChange()
Invoked when application locale is changed.
|
protected void |
processDeferredViews(String parentId,
Set<String> childrenIds)
Called to complete registration of deferred views.
|
void |
registerEventHandler(DMXEventRegistrationHandler handler)
Registers event handler for UI components.
|
void |
registerView(DMXView view)
Registers specified view with this view manager.
|
void |
selectView(String viewId,
Map<String,Object> params)
Sets specified view as currently active for this
ViewManager . |
void |
setContext(javax.servlet.ServletContext context)
Set application servlet context.
|
void |
setViewExtensionCallback(String viewId,
DMXExtensionCallback callback)
Sets extension callback of view with specified ID.
|
void |
updateView(String viewId,
Map<String,Object> dataValues)
Forces specified view to render itself due to change in model data.
|
void |
updateViewData(Map<String,Object> dataMap)
Updates views that depends on specified data.
|
afterInitialViewRegistration, getView, getViewDataIds, getViewIdsForData, handleExtensionData, registerView
public void setContext(javax.servlet.ServletContext context)
context
- context to setpublic void registerView(DMXView view)
registerView
in interface DMXViewManager
registerView
in class AbstractViewManager
view
- protected void processDeferredViews(String parentId, Set<String> childrenIds)
AbstractViewManager
processDeferredViews
in class AbstractViewManager
parentId
- registered parent viewchildrenIds
- ids of dependent viewspublic void selectView(String viewId, Map<String,Object> params)
DMXViewManager
Sets specified view as currently active for this
ViewManager
. Selecting the view will force it to be shown
(if not already) and render itself. Actual process of selecting the view is implementation
dependent and is out of the scope of this interface definition.
Parameters params
is a map of optional parameters which can be used by implementations
to determine conditions for selecting this view.
viewId
- name of the view to be shownparams
- optional parameters for selecting this viewpublic void updateView(String viewId, Map<String,Object> dataValues)
DMXViewManager
#selectView()
method, the view does not become active.viewId
- ID of the view to updatedataValues
- new data values to set for viewpublic void updateViewData(Map<String,Object> dataMap)
DMXViewManager
dataMap
- data mappublic void setViewExtensionCallback(String viewId, DMXExtensionCallback callback)
DMXViewManager
Sets extension callback of view with specified ID. The call to callback's
DMXExtensionCallback.getExtensionType()
method must return
DMXExtensionType#VIEW_EXTENSION
.
viewId
- view IDcallback
- callback to registerpublic void handleLocaleChange()
DMXViewManager
public void blockGui(boolean state, GUIBlockingScope scope, String... ids)
DMXViewManager
state
- whether to block or unblock GUI. If true
block, otherwise unblockscope
- blocking scopeids
- optional IDs of elements to blockpublic <T extends DialogFactory> T getDialogFactory()
DMXViewManager
T
- type of the implementation factoryDialogFactory
for the platformpublic void registerEventHandler(DMXEventRegistrationHandler handler)
DMXViewManager
handler
contains information
on what handler should be registered and on which UI components.handler
- event handlerCopyright © 2012-2014 Vektor Software. All Rights Reserved.