You use a property editor to provide a custom graphical
interface for your business-specific rule properties with a property
editor.
About this task
You provide a custom graphical interface for your business-specific
rule properties with a property editor renderer. When you implement
a property editor, to be able to use it in Decision
Center you
must repackage the Decision
Center archive
to integrate and declare the property editor.
Procedure
To define a custom property editor:
- Implement the property editor as a JSF renderer.
For
example, subclass IlrPropertyEditorRenderer and override
the method:
public void encodeValueField (FacesContext
context, UIComponent component, boolean checkPermission) throws IOException,
IlrApplicationException
- In the JSF configuration file (faces-config.xml),
map the name of the property editor in the extension model file to
the rendering class.
For example, if you had defined
the following editor name in the extension model file:
<property editorname="MyDocumentationWidget" name="statuscomment" type="String"/>
You
declare it in the following way in the JSF configuration file:
<renderer>
<component-family>IlrPropertyEditor</component-family>
<renderer-type>MyDocumentationWidget</renderer-type>
<renderer-class>ilog.rules.teamserver.web.components.property.renderers.MyDocumentationWidgetRenderer </renderer-class>
</renderer>
- Declare your JSF configuration in the extended-faces-config.xml file
in the WEBINF directory in the Decision
Center archive.
See Overview of customizing the Enterprise console GUI for more
information about JSF configuration and how you repackage the Decision
Center archive.
- Deploy the Decision
Center archive.