I am learning how to create UI Control on XPAGES (http://www-10.lotus.com/ldd/ddwiki.nsf/dx/Master_Table_of_Contents_for_XPages_Extensibility_APIs_Developer_Guide)
And I have created my own control and I have set single property in xsp-config using property tag. But when I try to set group property using property-type tag, that group property is not shown.
Here my xsp-config
<faces-config>
<faces-config-extension>
<namespace-uri>http://fortedynamic.org/xsp/control</namespace-uri>
<default-prefix>forte</default-prefix>
</faces-config-extension>
<component>
<description>Forte Input Text</description>
<display-name>Input Text</display-name>
<component-type>com.forte.InputText</component-type>
<component-class>com.forte.component.InputText</component-class>
<component-extension>
<component-family>com.forte.InputText</component-family>
<renderer-type>com.forte.InputText</renderer-type>
<tag-name>inputText</tag-name>
<designer-extension>
<in-palette>true</in-palette>
<category>Forte Library</category>
</designer-extension>
</component-extension>
<property>
<description>Data Source</description>
<display-name>Data Source</display-name>
<property-name>value</property-name>
<property-class>string</property-class>
<property-extension>
<designer-extension>
<category>forte</category>
</designer-extension>
</property-extension>
</property>
<property-type>
<property-name>event</property-name>
<display-name>Event</display-name>
<property-extension>
<container-class>java.util.Collection</container-class>
<collection-property>true</collection-property>
<designer-extension>
<category>forte</category>
</designer-extension>
</property-extension>
<property>
<property-name>refreshId</property-name>
<property-class>string</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.designer.domino.xsp.idpicker</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>clientEvent</property-name>
<property-class>string</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.designer.domino.client.script.editor</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>serverEvent</property-name>
<property-class>com.ibm.xsp.actions.ExecuteScriptAction</property-class>
</property>
<property>
<property-name>onStart</property-name>
<property-class>string</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.designer.domino.client.script.editor</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>onError</property-name>
<property-class>string</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.designer.domino.client.script.editor</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>onComplete</property-name>
<property-class>string</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.designer.domino.client.script.editor</editor>
</designer-extension>
</property-extension>
</property>
<property>
<property-name>immediate</property-name>
<property-class>boolean</property-class>
<property-extension>
<designer-extension>
<editor>com.ibm.std.BooleanCheckBox</editor>
</designer-extension>
</property-extension>
</property>
</property-type>
</component>
</faces-config>
Note :
Result of this xsp-config can display : "Data Source" property but "Event" group property is not shown.
Do I miss something to configure on xsp-config ?
I'm not sure about the use of property-extension, but when I manually create a group of properties in a Custom Control, then look at the xsp-config file in Package Explorer under Custom Controls, it looks like the classes are wrong.
Do you want a single property where the users enter an instance of a java.util.Collection? If so, try this:
If you want a property with multiple instances, try:
You can allow the users to enter it using the SSJS Editor by adding
<editor>com.ibm.workplace.designer.ide.xfaces.internal.editors.MethodBindingEditor</editor>
to<designer-extension>
So, it sounds like you want to provide a combo-box for selectable property values. To do this follow this pattern in the property:
To create an actual group:
You can find the total xsp-config/faces-config reference here: http://www-10.lotus.com/ldd/ddwiki.nsf/dx/XPages_configuration_file_format
EDIT: Ah, ok. So after reading your comment I think I understand. You want to be able to add items to something like a list. So, you'll have to create a complex type to support this.
And then in your component property (NOTE: The property-add-method tag, this will be a method in your component that in this case will add CustomComplexType objects to a java.util.List):