public interface IPluginGenericCustomGUIBean extends Serializable
Please note that this bean is unmanaged - functionality specific to managed bean is not available.
This means, for example, that annotations such as PostConstruct
and ManagedProperty
are not supported
and will not work.
PostConstruct
, you can use
initialize(de.xima.fc.interfaces.plugin.lifecycle.IPluginInitializeBeanData)
ManagedProperty
, you can access beans you need via the current FacesContext etc.
This bean should be annotated with ManagedBean
and specify a ManagedBean.name()
. If this annotation
is not present or or name is specified, the name defaults to the simple name of the bean class.
Also, this bean needs to be annotated one of the following scopes: RequestScoped
,
ViewScoped
, SessionScoped
or ApplicationScoped
. Note that it depends on the type of plugin
which scopes are actually supported. In case you do not specify a scope, an appropriate scope will be determined
automatically.
Certain features of managed beans may be supported partially, depending on the type of plugin, but may work differently. This includes, but is not limited to:
PostConstruct
and PreDestroy
are called may differ.ManagedProperty
may not work with all values allowed by the Java Beans specification, and may not
perform checks such as the check for circular dependencies. It will also not create new beans when those beans have
not been created yet as part of the current page.Modifier and Type | Method and Description |
---|---|
default void |
destroy()
A callback method that is called when this bean is not needed anymore.
|
IPluginFileHelper |
getFileHelper()
Lets you acces the file helper of the plugin that provided this UI.
|
Properties |
getProperties()
Lets you access the properties of the plugin that provided this UI.
|
IPluginResourceHelper |
getResourceHelper()
Lets you access the resource helper of the plugin that provided this UI.
|
default void |
initialize(IPluginInitializeBeanData initializeBeanData)
A callback method that is invoked after all beans required by the
IPluginGenericCustomGUI plugin were
created. |
default void destroy()
IPluginFileHelper getFileHelper()
IPluginFileHelper
The helper class for working with the plugin filesProperties getProperties()
Properties
The properties of the plugin.IPluginResourceHelper getResourceHelper()
IPluginResourceHelper
The helper class for working with resourcesdefault void initialize(IPluginInitializeBeanData initializeBeanData) throws FCPluginException
IPluginGenericCustomGUI
plugin were
created. You can use this method to get access to the plugin configuration data. If you need to perform any
initialization logic, do it in this method.initializeBeanData
- The IPluginInitializeBeanData
you can make use of in the initialization process.FCPluginException
- When the bean could not be initialized. If you do throw the exception, an error will be
shown to the user. Depending on the type of custom UI, the user may instead see an error page, a default page or be
redirected to another page.Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.