public class DMXAdapterJSF extends Object implements DMXAdapter, Serializable
DMXAdapter
used in JSF environment. This class is registered as JSF managed bean and
is available within application scope.DMXAdapter
,
Serialized FormModifier and Type | Field and Description |
---|---|
static String |
ADAPTER_BEAN_NAME
Name of this bean within JSF runtime.
|
Constructor and Description |
---|
DMXAdapterJSF()
Creates new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
executeTask(DMXTask task,
Object... args)
Execute specified task in background.
|
<T extends DialogFactory> |
getDialogFactory(Class<? extends DialogFactory> clazz)
Returns dialog factory for underlying platform.
|
DMXExtensionManager |
getExtensionManager()
Returns extension manager instance.
|
DMXWebModel |
getModel()
Returns data model associated with current session.
|
DMXResourceManager |
getResourceManager()
Returns resource manager associated with this adapter.
|
void |
initSession(javax.servlet.http.HttpSession session)
Initializes current session.
|
void |
invoke(String controllerId)
Invokes controller with specified ID.
|
void |
invoke(String controllerId,
Object arg1)
Invokes controller with specified ID.
|
void |
invoke(String controllerId,
Object arg1,
Object arg2)
Invokes controller with specified ID.
|
void |
invoke(String controllerId,
Object arg1,
Object arg2,
Object arg3)
Invokes controller with specified ID.
|
void |
invoke(String controllerId,
Object arg1,
Object arg2,
Object arg3,
Object arg4)
Invokes controller with specified ID.
|
void |
invoke(String controllerId,
Object arg1,
Object arg2,
Object arg3,
Object arg4,
Object arg5)
Invokes controller with specified ID.
|
void |
invokeController(String controllerId,
Object... args)
This method can not be called directly from JSF pages, since it is a
vararg method, and Expression Language
does not support varargs. |
void |
registerController(Class clazz)
Register controller from supplied class.
|
void |
registerController(DMXController controller)
Registers specified controller to be used by the Adapter.
|
void |
registerEventHandler(DMXEventRegistrationHandler handler)
Registers event handler for UI components.
|
void |
registerExtensionCallback(DMXExtensionCallback callback)
Registers extension callback for controller or view.
|
void |
registerView(Class clazz)
Register view from specified class.
|
void |
registerView(DMXView view)
Registers this view with this application.
|
void |
setRequest(javax.servlet.http.HttpServletRequest request)
Set current HTTP request.
|
void |
setServletContext(javax.servlet.ServletContext servletContext)
Sets servlet context for this adapter.
|
public static final String ADAPTER_BEAN_NAME
public void setServletContext(javax.servlet.ServletContext servletContext)
servletContext
- public DMXWebModel getModel()
public void initSession(javax.servlet.http.HttpSession session)
session
- HTTP sessionpublic void setRequest(javax.servlet.http.HttpServletRequest request)
request
- HTTP requestpublic DMXResourceManager getResourceManager()
DMXAdapter
getResourceManager
in interface DMXAdapter
DMXResourceManager
instancepublic DMXExtensionManager getExtensionManager()
DMXAdapter
getExtensionManager
in interface DMXAdapter
public void registerController(DMXController controller)
DMXAdapter
Registers specified controller to be used by the Adapter. Each controller needs to be registered in order to be used properly. This method will do the following:
If specified controller also implements DMXExtendable
, system will look for suitable
DMXExtensionCallback
for it. If found, controller will be registered. Otherwise, it will
be put on hold until suitable extension callback is registered, or system is started up completely.
registerController
in interface DMXAdapter
controller
- controller to registerpublic void registerController(Class clazz)
DMXAdapter
Register controller from supplied class. Parameter clazz
should be a Class
object
annotated with DMXControllerDeclaration
. It should also provide a default, no-argument constructor.
registerController
in interface DMXAdapter
clazz
- controller classpublic void registerView(DMXView view)
DMXAdapter
DMXViewManager
, and register view data with dataModel.registerView
in interface DMXAdapter
view
- view to registerpublic void registerView(Class clazz)
DMXAdapter
registerView
in interface DMXAdapter
clazz
- view classpublic void registerExtensionCallback(DMXExtensionCallback callback)
DMXAdapter
DMXExtendable
which match it.registerExtensionCallback
in interface DMXAdapter
callback
- extension callbackpublic <T extends DialogFactory> T getDialogFactory(Class<? extends DialogFactory> clazz)
DMXAdapter
getDialogFactory
in interface DMXAdapter
T
- type parameterclazz
- factory classDialogFactory
public void invokeController(String controllerId, Object... args)
vararg
method, and Expression Language
does not support varargs. Instead, call one of invoke(...)methods
invokeController
in interface DMXAdapter
controllerId
- controller IDargs
- argumentspublic void executeTask(DMXTask task, Object... args)
DMXAdapter
executeTask
in interface DMXAdapter
task
- task to executeargs
- execution argumentspublic void registerEventHandler(DMXEventRegistrationHandler handler)
DMXAdapter
handler
contains information
on what handler should be registered and on which UI components.registerEventHandler
in interface DMXAdapter
handler
- event handlerpublic void invoke(String controllerId)
invokeController(id);
controllerId
- ID of controller to invokepublic final void invoke(String controllerId, Object arg1)
invokeController(id, arg1);
controllerId
- ID of controller to invokearg1
- argument 1public final void invoke(String controllerId, Object arg1, Object arg2)
invokeController(id, arg1, arg2);
controllerId
- ID of controller to invokearg1
- argument 1arg2
- argument 2public final void invoke(String controllerId, Object arg1, Object arg2, Object arg3)
invokeController(id, arg1, arg2, arg3);
controllerId
- ID of controller to invokearg1
- argument 1arg2
- argument 2arg3
- argument 3public final void invoke(String controllerId, Object arg1, Object arg2, Object arg3, Object arg4)
invokeController(id, arg1, arg2, arg3, arg4);
controllerId
- ID of controller to invokearg1
- argument 1arg2
- argument 2arg3
- argument 3arg4
- argument 4public final void invoke(String controllerId, Object arg1, Object arg2, Object arg3, Object arg4, Object arg5)
invokeController(id, arg1, arg2, arg3, arg4, arg5);
controllerId
- ID of controller to invokearg1
- argument 1arg2
- argument 2arg3
- argument 3arg4
- argument 4arg5
- argument 5Copyright © 2012-2014 Vektor Software. All Rights Reserved.