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:
The XML code for the example looks as follows:
<natpage xmlns:njx="http://www.softwareag.com/njx/njxMapConverter">
<njx:xciwpfunctions>
</njx:xciwpfunctions>
</natpage>
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_TOPICNAMEName of the topic. ADDTOPIC_TOPICTEXTIDMulti language dependent text that is displayed inside the control. The ADDTOPIC_TOPICTEXTIDis translated into a corresponding string at runtime.ADDTOPIC_TREECLASSSets the style class for rendering the tree area of the topic. There are ten standard style classes available in the default style sheet: PLACETOPIC1ClientTreetoWORKPLACETOPIC10ClientTree. 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_FOLDERNAMEName of the folder. ADDFOLDER_FOLDERTEXTIDMulti language dependent text that is displayed inside the control. The ADDFOLDER_FOLDERTEXTIDis translated into a corresponding string at runtime.ADDFOLDER_OPENED0: 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_TOPICNAMEName of the topic to which the folder is to be added. ADDFOLDER_TOPICTEXTIDMulti language dependent text that is displayed inside the control. The ADDFOLDER_TOPICTEXTIDis translated into a corresponding string at runtime.- Add a node
You can add all kinds of topic subnodes with the
CMDADDNODEstructure. 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 theADDNODE_FOLDERNAMEorADDNODE_FOLDERTEXTIDelement.Example:
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_NAMEName of the node to be added. ADDNODE_TEXTIDMulti language dependent text that is displayed inside the control. The ADDNODE_TEXTIDis translated into a corresponding string at runtime.ADDNODE_FOLDERNAMEName of the folder to which the node is to be added. ADDNODE_FOLDERTEXTIDMulti language dependent text that is displayed inside the control. The ADDNODE_FOLDERTEXTIDis translated into a corresponding string at runtime.ADDNODE_TOPICNAMEName of the topic that contains this folder. ADDNODE_TOPICTEXTIDMulti language dependent text that is displayed inside the control. The ADDNODE_TOPICTEXTIDis 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_ACTIVITYURLThe URL to be loaded when the user clicks on the node. You can append parameters to the URL. ADDNODE_ACTIVITYIDUse 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_LEFTOnly with type "cispopup" and "htmlpopup". Set the relative position of the pop-up in pixels. ADDNODE_TOPOnly with type "cispopup" and "htmlpopup". Set the relative position of the pop-up in pixels. ADDNODE_HEIGHTOnly with type "cispopup" and "htmlpopup". Set the dimension of the pop-up in pixels. ADDNODE_WIDTHOnly with type "cispopup" and "htmlpopup". Set the dimension of the pop-up in pixels. ADDNODE_TARGETOnly 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_TOPICNAMEName of the topic to be removed. REMTOPIC_TOPICTEXTIDMulti language dependent text that is displayed inside the control. The REMTOPIC_TOPICTEXTIDis translated into a corresponding string at runtime.- Remove a folder
The following structure elements belong to
CMDREMFOLDER:
Element Meaning REMFOLDER_FOLDERNAMEName of the folder to be removed. REMFOLDER_FOLDERTEXTIDMulti language dependent text that is displayed inside the control. The REMFOLDER_FOLDERTEXTIDis translated into a corresponding string at runtime.REMFOLDER_TOPICNAMEName of the topic that contains the folder. REMFOLDER_TOPICTEXTIDMulti language dependent text that is displayed inside the control. The REMFOLDER_TOPICTEXTIDis translated into a corresponding string at runtime.- Remove a node
You can remove all kinds of topic subnodes with the
CMDREMNODEstructure. Since a function tree can have any depth, you can precisely define which node to remove by specifying corresponding XPATH-like path information in theREMNODE_FOLDERNAMEorREMNODE_FOLDERTEXTIDelement.Example:
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_FOLDERNAMEName of the folder that contains the node to be removed. REMNODE_FOLDERTEXTIDMulti language dependent text that is displayed inside the control. The REMNODE_FOLDERTEXTIDis translated into a corresponding string at runtime.REMNODE_NAMEName of the node to be removed. REMNODE_TEXTIDMulti language dependent text that is displayed inside the control. The REMNODE_TEXTIDis translated into a corresponding string at runtime.REMNODE_TOPICNAMEName of the topic that contains the folder with the node to be removed. REMNODE_TOPICTEXTIDMulti language dependent text that is displayed inside the control. The REMNODE_TOPICTEXTIDis translated into a corresponding string at runtime.