Extension Point for Contributing Tooling for XPages Controls
Identifier:
com.ibm.designer.domino.xsp.editor.component
Since:
IBM Domino Designer 8.5.3
Description:
This extension point is used to provide design time support for XPages controls. Clients interested in contributing tooling to IBM Domino Designer for their XPages controls should use this extension point to contribute custom properties panels and palette drop actions.
Configuration Markup:
<!ELEMENT extension (components+)>
<!ATTLIST extension
point CDATA #REQUIRED
id CDATA #IMPLIED
name CDATA #IMPLIED
>
A 'universal' extension point that is used to contribute the tooling for XPage controls.
- point - a fully qualified identifier of the target extension point
- id - an optional identifier of the extension instance
- name - an optional name of the extension instance
<!ELEMENT components (component+ , paletteInfo?)>
<!ATTLIST components
schemaUri CDATA #REQUIRED
panelsFactory CDATA #IMPLIED
id CDATA #REQUIRED
name CDATA #IMPLIED
neverShowInPalette (true | false)
>
Container element that define the design time support for a particular schemaUri. It provides global behaviour through its factory attributes to each of its component elements.
Note that in most cases, these factories can be overriden at the component level
- schemaUri - The schema URI that applies to the group of controls whose tooling is being defined. This property MUST correspond exactly to the namespace URI used for the same controls in the XPages registry.
- panelsFactory - A fully qualified name of a class that implements com.ibm.designer.domino.xsp.api.panels.IPanelsFactory. Clients are advised to extend com.ibm.designer.domino.xsp.api.panels.AbstractPanelsFactory rather than implementing the interface above.
This is the default factory for a whole group of controls, individual controls may override this factory to provide custom behaviour. The panelsFactory class is responsible for generating panel Class objects based on the ids provided in the panels selection of this extension point.
- id - A unique id that identifies this group of controls.
- name - An optional name which is only used internally.
- neverShowInPalette - An optional attribute that specifies that all of the controls defined in the group of controls are not to appear in the Controls Palette.
<!ELEMENT paletteInfo (category)>
Generic Controls Palette information for this group of controls.
<!ELEMENT category EMPTY>
<!ATTLIST category
iconSmall CDATA #IMPLIED
iconLarge CDATA #IMPLIED
label CDATA #IMPLIED
description CDATA #IMPLIED
visible (true | false)
id CDATA #IMPLIED
>
Provides Controls Palette drawer information. Note that each component may override, and provide alternative drawer information.
- iconSmall - The path to the small icon for the Controls Palette drawer.
- iconLarge - The path to the large icon for the Controls Palette drawer.
- label - Label that appears in the Controls Palette drawer ( this is translatable).
- description - A general description to be used as the tooltip for the Controls Palette drawer (this is translatable).
- visible - A boolean flag denoting whether this Controls Palette drawer is visible by default.
- id - An optional ID that may be used to identify the category at a later point.
<!ELEMENT component (paletteItem? , panels? , alternateTags?)>
<!ATTLIST component
tagName CDATA #REQUIRED
panelsFactory CDATA #IMPLIED
neverShowInPalette (true | false)
visualizationFactory CDATA #IMPLIED
>
Design time support of an individual XPages control. Each 'component' will typically have a paletteItem and panels item associated with it.
- tagName - The tag Name associated with this component. Note : the schemaUri is defined in the enclosing components element. The tag name is the XML local name of the tag, e.g. 'inputText'.
- panelsFactory - A fully qualified name of a class that implements com.ibm.designer.domino.xsp.api.panels.IPanelsFactory. Clients are advised to extend com.ibm.designer.domino.xsp.api.panels.AbstractPanelsFactory rather than implementing the interface above. Typically the factory is defined in the components item, but the factory may be overwritten at the individual control level, though this is rarely necessary. The panelsFactory class is responsible for generating panel Class objects based on the ids provided in the panels selection of this extension point.
- neverShowInPalette - An optional attribute that specifies that all of the controls defined in the group of controls are not to appear in the Controls Palette.
- visualizationFactory - A fully qualified class name that provides the location of a factory class that will be called to return a visualization for the provided control. The 'visualization' is in the form of XSP markup. The markup is then rendered by the design editor and a visualization is created.
<!ELEMENT paletteItem EMPTY>
<!ATTLIST paletteItem
label CDATA #IMPLIED
iconSmall CDATA #IMPLIED
iconLarge CDATA #IMPLIED
visible (true | false)
description CDATA #IMPLIED
action CDATA #IMPLIED
id CDATA #IMPLIED
>
Palette Item information about the enclosed component.
- label - A short label that describes the control. This label will appear in the Controls Palette so it should be descriptive enough to inform users of the use of the control (Trasnslatable).
- iconSmall - The path to the small icon for the Controls Palette item.
- iconLarge - The path to the large icon for the Controls Palette item.
- visible - A boolean flag denoting whether this Controls Palette item is visible by default.
- description - A short description to be used as the tooltip for the Controls Palette item (this is translatable).
- action - A fully qualified name of an action class that extends com.ibm.designer.domino.xsp.api.palette.XPagesPaletteDropActionDelegate. This is an optional property. If not specified the default palette drop action delegate will be used.
- id - An optional ID that may be used to identify the palette item programatically.
<!ELEMENT panels (panel+)>
List of panel elements for the enclosed component element
<!ELEMENT panel EMPTY>
<!ATTLIST panel
title CDATA #REQUIRED
id CDATA #REQUIRED
indented (true | false)
lazyInit (true | false)
icon CDATA #IMPLIED
contextId CDATA #IMPLIED
>
Property panel information. A panel element represents a single property panel tab in the attributes view.
- title - The title that appears in the attribute view for this panel ( translatable ).
- id - A unique id for the current panel. IDs may be reused across controls, e.g. if two controls use the same "font" panel then both definitions will reuse the same ID. The ID in turn is provided to the factory defined in the panelsFactory attribute of either the 'component' or 'components' above. The factory must resolve the ID to a Class.
- indented - The attribute that defines whether or not the panel should be indented
- lazyInit - The attribute that defines whether or not the specified panel should always be initialized or only initialized when it is about to become visible
- icon - The icon that is to be used in conjunction with this property panel tab. The path should be relative to the current plugin.
- contextId - A fully qualified context id that is used to display help for the property panel.
<!ELEMENT alternateTags (alternateTagName+)>
<!ELEMENT alternateTagName EMPTY>
<!ATTLIST alternateTagName
tagName CDATA #REQUIRED
>
Describes alternative tags that use the same control information. For instance a text field and a password field might have identical tooling needs, in which case it would not be necessary to redefine the same information twice.
- tagName - The XML local name of the alternate tag.
Examples:
<extension point="com.ibm.designer.domino.xsp.editor.component">
<!-- Define the top level information such as the namespace URI for the library and the
factory that is to be used to create the Property Panels -->
<components schemaUri="http://www.myco.com/xsp/ext" panelsFactory="com.myco.xpages.tooling.panels.MyPanelsFactory">
<!-- Define a Palette Drawer -->
<paletteInfo>
<category iconSmall="icons/palette/mySmallComponents.gif"
iconLarge="icons/palette/myLargeComponents.gif"
label="My XPage Controls"
description="XPage controls created via the XPages extensibility APIs"
id="com.myco.mypalette.drawer.category"
visible="true">
</category>
</paletteInfo>
<!-- Define the tooling for a particular control
In this case we are tooling the pieChart control.-->
<component tagName="pieChart"
visualizationFactory="com.myco.charts.visual.BarChartFactory">
<!-- Create a palette entry for the control -->
<paletteItem label="Pie Chart"
iconSmall="icons/palette/pieChart_16.gif"
iconLarge="icons/palette/pieChart_24.gif"
description="A pie chart control"
visible="true">
</paletteItem>
<panels>
<!-- We have three panels, Basics, Format and Data.
These panel IDs will be resolved by the panels factory-->
<panel title="Basic" id="com.myco.charts.basic.panel.id"/>
<panel title="Format" id="com.myco.charts.format.panel.id"/>
<panel title="Data" id="com.myco.charts.pie.data.panel.id"/>
</panels>
</component>
<!-- Define the tooling for the barChart control -->
<component tagName="barChart">
<!-- Define the palette item -->
<paletteItem label="Bar Chart"
iconSmall="icons/palette/barChart_16.gif"
iconLarge="icons/palette/barChart_24.gif"
description="A bar chart control"
class="com.myco.xpages.tooling.palette.BarChartDropAction"
visible="true">
</paletteItem>
<panels>
<!-- We have four panels, Basics, Format, Data, and Legend.
These panel IDs will be resolved by the panels factory-->
<panel title="Basic" id="com.myco.charts.basic.panel.id"/>
<panel title="Format" id="com.myco.charts.format.panel.id"/>
<!-- Notice two of the IDs are the same as the previous control and two are different.
This is because the two fictional controls have the exact same Basic and Format panels
but have a different Data panels.
-->
<panel title="Data" id="com.myco.charts.bar.data.panel.id"/>
<panel title="Legend" id="com.myco.charts.legend.panel.id"/>
</panels>
</component>
</components>
</extension>
API Information:
Clients who are interested in creating custom tooling for their XPage controls must implement the APIs corresponding to this extension point. It is strongly advised that clients extend the default implementation rather than re-implementing the interfaces entirely from scratch.
Supplied Implementation:
com.ibm.designer.domino.xsp.api.palette.XPagesPaletteDropActionDelegate is the default drop action delegate for all palette drop actions. Controls will use this action by default if not overridden by the component extension.
(C) Copyright IBM Corp. 2011, 2014