Skip to content

Instantly share code, notes, and snippets.

@PatrickKwinten
Created October 19, 2017 09:10
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save PatrickKwinten/3c7d21ee2e25f952b8086794504f2a59 to your computer and use it in GitHub Desktop.
configuration file for custom control
<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/custom</namespace-uri>
<default-prefix>xc</default-prefix>
</faces-config-extension>
<composite-component>
<component-type>ccUtilsGenericView</component-type>
<composite-name>ccUtilsGenericView</composite-name>
<composite-file>/ccUtilsGenericView.xsp</composite-file>
<composite-extension>
<designer-extension>
<in-palette>true</in-palette>
<render-markup>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &#xd;
&lt;xp:view xmlns:xp="http://www.ibm.com/xsp/core"&gt; &#xd;
&lt;xp:panel style="border:2px dotted #DDD;margin:10px 0 10px 0;"&gt; &#xd;
&lt;h3&gt;Custom Control - ccGenericView&lt;/h3&gt;&#xd;
&lt;p&gt;Displays a list of documents&lt;/p&gt;&#xd;
&lt;/xp:panel&gt; &#xd;
&lt;/xp:view&gt;</render-markup>
</designer-extension>
</composite-extension>
<property>
<property-name>collection</property-name>
<property-class>object</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.workplace.designer.property.editors.ComplexPropertyEditor</editor>
</designer-extension>
</property-extension>
<description>the data collection. mostly an arraylist of java objects. may lay in viewScope variable</description>
</property>
<property>
<property-name>header</property-name>
<property-class>string</property-class>
<description>H2 header on top of view</description>
</property>
<property>
<property-name>pageLink</property-name>
<property-class>string</property-class>
<description>the XPage that will be used in the generated link</description>
</property>
<property>
<property-name>icon</property-name>
<property-class>string</property-class>
<description>font awesome icon to identify each entry in the view e.g. fa fa-user</description>
</property>
<property>
<property-name>linkName</property-name>
<property-class>object</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.workplace.designer.property.editors.ComplexPropertyEditor</editor>
</designer-extension>
</property-extension>
<description>the field on the Java object that will be used for the text of the generated link</description>
</property>
<property>
<property-name>linkParam</property-name>
<property-class>string</property-class>
<description>Java object field that will be used as text for the parameter in the genereated link</description>
</property>
<property>
<property-name>linkKey</property-name>
<property-class>object</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.workplace.designer.property.editors.ComplexPropertyEditor</editor>
</designer-extension>
</property-extension>
<description>Java object field that will be used as unique identifier for the parameter in the generated link</description>
</property>
<property>
<property-name>linkHeader</property-name>
<property-class>string</property-class>
<description>Text that will be used as header for the first column that contains the generated link</description>
</property>
<property>
<property-name>rows</property-name>
<property-class>int</property-class>
</property>
<property>
<property-name>pagerTop</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.std.BooleanCheckBox</editor>
<default-value>true</default-value>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>pagerBottom</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.std.BooleanCheckBox</editor>
<default-value>true</default-value>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>pagerSizer</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.std.BooleanCheckBox</editor>
<default-value>true</default-value>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>cols</property-name>
<property-class>object</property-class>
<description>JSON object to generate the columns for the view (the first column excluded). Format : [{"colName":"xxx","colValue":"xxx"},{"colName":"yyy","colValue":"yyyy"}]</description>
<property-extension>
<designer-extension>
<editor>com.ibm.workplace.designer.property.editors.ComplexPropertyEditor</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>iconDisplay</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.std.Boolean</editor>
<default-value>true</default-value>
</designer-extension>
</property-extension>
<description>Display icon Y/N?</description>
</property>
<property>
<property-name>LinkColumnWidth</property-name>
<property-class>string</property-class>
<description>width for link column use bootstrap col definition (e.g. col-md-3)</description>
</property>
<property>
<property-name>headerSize</property-name>
<property-class>string</property-class>
<description>H1, H2, H3...?</description>
</property>
<property>
<property-name>panelStyle</property-name>
<property-class>string</property-class>
<description>CSS for the main container element</description>
</property>
</composite-component>
</faces-config>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment