NJX:XCIWPFUNCTIONS

The NJX:XCIWPFUNCTIONS control is used to modify the function tree that is shown in the "Functions" frame (MFWPFUNCTIONS) incrementally. In order to access the content of the function tree or to exchange it as a whole, you have to use the NJX:XCIWPINFO2 control.

The NJX:XCIWPFUNCTIONS control provides a functional API to the workplace. It does not have design time properties nor does it raise events.

The following topics are covered below:


Example

The XML code for the example looks as follows:

<natpage xmlns:njx="http://www.softwareag.com/njx/njxMapConverter">
    <njx:xciwpfunctions>
    </njx:xciwpfunctions>
</natpage>

Adapter Interface

1 XCIWPFUNCTIONS (1:*)
2 CMDADDFOLDER 
3 ADDFOLDER_ASFIRST (L)
3 ADDFOLDER_FOLDERNAME (U) DYNAMIC
3 ADDFOLDER_FOLDERTEXTID (U) DYNAMIC
3 ADDFOLDER_OPENED (I4)
3 ADDFOLDER_TOPICNAME (U) DYNAMIC
3 ADDFOLDER_TOPICTEXTID (U) DYNAMIC
2 CMDADDNODE 
3 ADDNODE_ACTIVITYID (U) DYNAMIC
3 ADDNODE_ACTIVITYURL (U) DYNAMIC
3 ADDNODE_ASFIRST (L)
3 ADDNODE_FOLDERNAME (U) DYNAMIC
3 ADDNODE_FOLDERTEXTID (U) DYNAMIC
3 ADDNODE_HEIGHT (I4)
3 ADDNODE_LEFT (I4)
3 ADDNODE_NAME (U) DYNAMIC
3 ADDNODE_TARGET (U) DYNAMIC
3 ADDNODE_TEXTID (U) DYNAMIC
3 ADDNODE_TOP (I4)
3 ADDNODE_TOPICNAME (U) DYNAMIC
3 ADDNODE_TOPICTEXTID (U) DYNAMIC
3 ADDNODE_TYPE (U) DYNAMIC
3 ADDNODE_WIDTH (I4)
2 CMDADDTOPIC 
3 ADDTOPIC_SWITCHTOTOPIC (L)
3 ADDTOPIC_TOPICNAME (U) DYNAMIC
3 ADDTOPIC_TOPICTEXTID (U) DYNAMIC
3 ADDTOPIC_TREECLASS (U) DYNAMIC
2 CMDREMFOLDER 
3 REMFOLDER_FOLDERNAME (U) DYNAMIC
3 REMFOLDER_FOLDERTEXTID (U) DYNAMIC
3 REMFOLDER_TOPICNAME (U) DYNAMIC
3 REMFOLDER_TOPICTEXTID (U) DYNAMIC
2 CMDREMNODE 
3 REMNODE_FOLDERNAME (U) DYNAMIC
3 REMNODE_FOLDERTEXTID (U) DYNAMIC
3 REMNODE_NAME (U) DYNAMIC
3 REMNODE_TEXTID (U) DYNAMIC
3 REMNODE_TOPICNAME (U) DYNAMIC
3 REMNODE_TOPICTEXTID (U) DYNAMIC
2 CMDREMTOPIC 
3 REMTOPIC_TOPICNAME (U) DYNAMIC
3 REMTOPIC_TOPICTEXTID (U) DYNAMIC

Each occurrence in the array XCIWPFUNCTIONS describes a command that is to be sent to the workplace API. Several commands can be sent in a sequence. For each command, a corresponding substructure must be filled.

Add a topic

The following structure elements belong to CMDADDTOPIC:

Element Meaning
ADDTOPIC_SWITCHTOTOPIC "true": Open the new topic.
ADDTOPIC_TOPICNAME Name of the topic.
ADDTOPIC_TOPICTEXTID Multi language dependent text that is displayed inside the control. The ADDTOPIC_TOPICTEXTID is translated into a corresponding string at runtime.
ADDTOPIC_TREECLASS Sets the style class for rendering the tree area of the topic. There are ten standard style classes available in the default style sheet: PLACETOPIC1ClientTree to WORKPLACETOPIC10ClientTree. These style sheets can be maintained with the style sheet editor of the Application Designer.
Add a folder

The following structure elements belong to CMDADDFOLDER:

Element Meaning
ADDFOLDER_ASFIRST

"true": Add this folder as the first folder under the given topic.

"false": Add this folder as the last folder under the given topic.

ADDFOLDER_FOLDERNAME Name of the folder.
ADDFOLDER_FOLDERTEXTID Multi language dependent text that is displayed inside the control. The ADDFOLDER_FOLDERTEXTID is translated into a corresponding string at runtime.
ADDFOLDER_OPENED

0: Add the folder as a closed folder with potential subnodes.

1: Add the folder as an opened folder.

2: Add the folder as a closed folder without subnodes.

ADDFOLDER_TOPICNAME Name of the topic to which the folder is to be added.
ADDFOLDER_TOPICTEXTID Multi language dependent text that is displayed inside the control. The ADDFOLDER_TOPICTEXTID is translated into a corresponding string at runtime.
Add a node

You can add all kinds of topic subnodes with the CMDADDNODE structure. Since a function tree can have any depth, you can precisely define the parent node for which you would like to add the new node as a child node. This can be done by specifying corresponding XPATH-like path information in the ADDNODE_FOLDERNAME or ADDNODE_FOLDERTEXTID element.

Example:

New node

To add the node named "New Node", specify the following:

ADDNODE_TOPICNAME="Maintain Workplace"
ADDNODE_FOLDERNAME = "Maintain Function Tree/Modify Function Tree/Add Topics and Nodes"
ADDNODE_NAME="New Node"

The following structure elements belong to CMDADDNODE:

Element Meaning
ADDNODE_NAME Name of the node to be added.
ADDNODE_TEXTID Multi language dependent text that is displayed inside the control. The ADDNODE_TEXTID is translated into a corresponding string at runtime.
ADDNODE_FOLDERNAME Name of the folder to which the node is to be added.
ADDNODE_FOLDERTEXTID Multi language dependent text that is displayed inside the control. The ADDNODE_FOLDERTEXTID is translated into a corresponding string at runtime.
ADDNODE_TOPICNAME Name of the topic that contains this folder.
ADDNODE_TOPICTEXTID Multi language dependent text that is displayed inside the control. The ADDNODE_TOPICTEXTID is translated into a corresponding string at runtime.
ADDNODE_ASFIRST

"true": Add this node as the first node under the given folder.

"false": Add this node as the last node under the given folder.

ADDNODE_ACTIVITYURL The URL to be loaded when the user clicks on the node. You can append parameters to the URL.
ADDNODE_ACTIVITYID Use this element if you want to start different pages with the same name.
ADDNODE_TYPE

"cis": A node that opens an Application Designer page in the "Content" frame.

"html": A node that opens an HTML page in the "Content" frame.

"cispopup": A node that opens an Application Designer page in a pop-up window.

"htmlpopup": A node that opens an HTML page in a pop-up window.

"cistarget": A node that opens an Application Designer page in a target frame other than the "Content" frame.

"htmlpopup": A node that opens an HTML page in a target frame other than the "Content" frame.

ADDNODE_LEFT Only with type "cispopup" and "htmlpopup". Set the relative position of the pop-up in pixels.
ADDNODE_TOP Only with type "cispopup" and "htmlpopup". Set the relative position of the pop-up in pixels.
ADDNODE_HEIGHT Only with type "cispopup" and "htmlpopup". Set the dimension of the pop-up in pixels.
ADDNODE_WIDTH Only with type "cispopup" and "htmlpopup". Set the dimension of the pop-up in pixels.
ADDNODE_TARGET Only with type "cistarget" and "htmltarget". Name of the target frame in which the page is to be opened. During workplace definition, you assign a target ID to each frame you define.
Remove a topic

The following structure elements belong to CMDREMTOPIC:

Element Meaning
REMTOPIC_TOPICNAME Name of the topic to be removed.
REMTOPIC_TOPICTEXTID Multi language dependent text that is displayed inside the control. The REMTOPIC_TOPICTEXTID is translated into a corresponding string at runtime.
Remove a folder

The following structure elements belong to CMDREMFOLDER:

Element Meaning
REMFOLDER_FOLDERNAME Name of the folder to be removed.
REMFOLDER_FOLDERTEXTID Multi language dependent text that is displayed inside the control. The REMFOLDER_FOLDERTEXTID is translated into a corresponding string at runtime.
REMFOLDER_TOPICNAME Name of the topic that contains the folder.
REMFOLDER_TOPICTEXTID Multi language dependent text that is displayed inside the control. The REMFOLDER_TOPICTEXTID is translated into a corresponding string at runtime.
Remove a node

You can remove all kinds of topic subnodes with the CMDREMNODE structure. Since a function tree can have any depth, you can precisely define which node to remove by specifying corresponding XPATH-like path information in the REMNODE_FOLDERNAME or REMNODE_FOLDERTEXTID element.

Example:

New node

To remove the node named "New Node", specify the following:

REMNODE_TOPICNAME="Maintain Workplace"
REMNODE_FOLDERNAME = "Maintain Function Tree/Modify Function Tree/Add Topics and Nodes"
REMNODE_NAME="New Node"

The following structure elements belong to CMDREMNODE:

Element Meaning
REMNODE_FOLDERNAME Name of the folder that contains the node to be removed.
REMNODE_FOLDERTEXTID Multi language dependent text that is displayed inside the control. The REMNODE_FOLDERTEXTID is translated into a corresponding string at runtime.
REMNODE_NAME Name of the node to be removed.
REMNODE_TEXTID Multi language dependent text that is displayed inside the control. The REMNODE_TEXTID is translated into a corresponding string at runtime.
REMNODE_TOPICNAME Name of the topic that contains the folder with the node to be removed.
REMNODE_TOPICTEXTID Multi language dependent text that is displayed inside the control. The REMNODE_TOPICTEXTID is translated into a corresponding string at runtime.