Creating a custom UDM  
 
 
 
 
  1
3
 
 
The Details Tab
 
On the Details tab, the following fields appear:
 
 
The name of the node. This defaults to the name of the UDM. The node name is case sensitive and cannot include special characters or spaces.
 
 
The node ID. The ID holds an automatically generated ID for the node and cannot be modified. For the root node, this ID is 0. zeroCode generates node ids in multiples of 100. The node Ids provide an easy point of reference. The large interval between the node ids of the two siblings ensures that there is enough room to accommodate additional data without offsetting the existing data.  
 
 
UDM parameters. These are parameters that the UDM can take as values that it can use in retrieving content from a data source. For example, you could pass a parameter the ID of an employee to retrieve that employee's record. Parameters are strings that can be used anywhere in the UDM, when creating a new node, to be used as input when retrieving data for that node. They can also be used in predicates that are applied to nodes in the UDM. As many as 12 parameters can be passed to a UDM.
 
 
Session variables. zeroCode creates the login ID as a default session variable on the creation of your site if you chose to have a login page initially. This session variable carries the login id accessible across all the pages in your site. This session variable can again be used in a node of the UDM for retrieving data or display on a page.
 
 
The session variable's mode. Session variables have options like its name, its mode of use and the node it is bound to (Bound to node). Consider the login ID as an example. The login ID can be passed as an input to your UDM. In this case it will be used in the present UDM in read-only mode. If the login ID is to be passed as an output from your UDM, this variable is created in the current UDM and carried as input to the response UDM of this one. The login ID can be passed as an input to the current UDM as well be passed as an output that becomes input to the response UDM, if you choose the option "both input and output".
 
 
Bound to Node. In this option you can bind your session variable to a particular node, typically to set it in Output or Both modes.
 
 
Visual Aspects. In this section, you can give the generated page a suitable heading that appears at the top of the page. This string is used directly in the automatically generated HTML. You can save changes by clicking on the Save button. You can now start creating nodes in the custom UDM. In the top frame of the UDM editor, you will see a series of icons representing various functions as buttons. Move the mouse over each icon to familiarize yourself with the functionality of each icon.
   
 
The Add child icon is used for creating a child node to the currently chosen node.
   
 
The Add Relator icon/button adds a relator at the currently chosen node.
   
 
The Delete Node button deletes the current selected node.
   
 
The Move up and Move down buttons move the current node up or down at the same level in the hierarchy. You can use this mechanism to control the HTML that is created via the automatic generation mechanism (the Regenerate button, described below). The HTML generated follows the sequence in which nodes appear in the UDM, so you may want to move nodes around based on user preferences. Note that moving these nodes around in no way impacts the definition of the tables in your database - the Java layer in your site ensures that the retrieved data is shown in the appropriate fields.
   
 
The Preview HTML button shows the preview of the HTML for your custom UDM with two controls named "Show source" and "Save HTML". Note that, if you have made changes to the HTML using a normal HTML editor, those changes are reflected here, in the preview.
   
 
The Regenerate HTML button generates the HTML page (template) for your designed custom UDM again, based on the UDM structure. Once you are through with building your custom UDM, in order to generate the HTML for the same, click this button. This action again takes you to the preview mode with the two self-descriptive controls named "Show source" and "Save HTML". If you have made changes to your custom UDM's HTML, saving the regenerated HTML here will destroy those changes!
 
 
zeroCode generates the HTML for your custom UDM with inbuilt JavaScript validations for each control item in your UDM, by default. For special functionality, you may want to write your own JavaScript or FreeMarker functions and include them in the HTML. Click the Show source button and you will see the source code hat zeroCode generated. You can manually make your changes in this window or copy the content to your favorite HTML editor, for easier editing, and then replace the language here from your editor. Once the changes are done, save the changes by clicking the "Save HTML" button.
 
 
When you log into your generated site, all custom UDMs you created show up automatically in the left-hand side of your menu, if you are using the default menu page that zeroCode creates. If you have your own menu page, you will need to add the links to your custom pages wherever you see fit.
   
 
 
  1
3