Interface IPluginFormElementCatalogue
-
- All Superinterfaces:
IFCPlugin
,INamedUiElement
,INameProviding
,ITransferable
,Serializable
public interface IPluginFormElementCatalogue extends IFCPlugin
Interface for plugins that may add a set of form items to the designer. Each catalog plugin may provide one or many catalogs, each catalogs consist of one or more form items. The available catalogs and form items are shown in the designer in the catalog tab of the element panel to the left.- Author:
- XIMA MEDIA GmbH
-
-
Field Summary
-
Fields inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
CONFIG_FILENAME
-
Fields inherited from interface de.xima.fc.interfaces.INamedUiElement
ATTR_DISPLAY_NAME
-
Fields inherited from interface de.xima.fc.entities.interfaces.INameProviding
ATTR_NAME, COL_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.alibaba.fastjson.JSONArray
getCatalogueData(String catalogId, Locale locale)
This methods should return all catalog form items contained in the given catalog.com.alibaba.fastjson.JSONArray
getCatalogueList(Locale locale)
This methods should return a list of all available form catalogs.String
getCatalogueName(Locale locale)
String
getId()
-
Methods inherited from interface de.xima.fc.plugin.interfaces.IFCPlugin
getDescription, getDescription, getDisplayName, getName, initialize, initPlugin, install, shutdown, shutdown, uninstall
-
-
-
-
Method Detail
-
getCatalogueData
com.alibaba.fastjson.JSONArray getCatalogueData(String catalogId, Locale locale)
This methods should return all catalog form items contained in the given catalog. Each item must contain the following keys:- className
- The type of the form element, e.g.
XFooter
,XHeader
,XPage
,XContainer
,XFieldSet
,XSpan
,XTextField
,XTextArea
,XSelect
,XButtonList
,XCheckbox
,XImage
,XLine
,XSpacer
, orXUpload
- properties
- A JSON object with the properties of the item. The key is one of the possible values defined in
Enum.name()
XPropertyEnum.catalogue
Must contain the given catalog ID.XPropertyEnum.cataloguename
Either the catalog ID or a human readable name of the catalog.XPropertyEnum.catalogueunique
An arbitrary, unique ID for this catalog.
- use_name_idx
- Optional boolean flag. When true and a new item is created, the name of the item includes an incremental index, such as
tf1, tf2
etc.In addition, each form item should also have more properties dependent of the type of form item (
className
). SeeIXItemBasic.getAvailableProperties(Locale)
for a list of properties required for each item type, e.g.XButtonList.getAvailableProperties(Locale)
orXTextField.getAvailableProperties(Locale)
.You can also see which keys are used by existing FORMCYCLE form item types by opening the designer in a browser. Open the developer tools and inspect the following JavaScript object:
window.designer.config.xitemdesc
To see the values the properties of an existing form item, inspect the following JavaScript object.window.designer.items["<item-id>"]
You can find the ID of a form item by inspectingxi
attribute of the HTML container element with the classxm-item-div
. For example, the first input field added to a new form will have the IDxi-tf-1
.- Parameters:
catalogId
- An catalog ID, as returned bygetCatalogueList(Locale)
.locale
- The locale for which the catalog should be returned. May be used for locale-specific catalogs.- Returns:
- An array of catalog form items contained in the given catalog.
-
getCatalogueList
com.alibaba.fastjson.JSONArray getCatalogueList(Locale locale)
This methods should return a list of all available form catalogs. Each catalog descriptor is aJSONObject
with the following properties:- id
- A unique ID for the catalog, which must not depend on the given locale.
- name
- A human-readable name of the catalog, which may depend on the given locale.
- Parameters:
locale
- The current locale for which the list of catalogs is shown. The name of the catalog may depend on this locale.- Returns:
- A
List
of available catalogs.
-
getCatalogueName
String getCatalogueName(Locale locale)
- Parameters:
locale
- The current locale for which this catalog plugin is shown.- Returns:
- The name of this catalog plugin.
-
getId
String getId()
- Returns:
- The ID of this catalog plugin.
-
-