Junos Space SDK > Developer Guides > Junos Space Application Developer Guide > Programming with the Junos Space SDK > Using the Junos Space SDK Plug-in

Using the Module.xml Editor

The module.xml editor (described in the Using the Module.xml Editor topic) is an Eclipse view where you can edit the module.xml file for a Junos Space application. To use the editor:

  1. Double click <ProjectName> | EarContent | META-INF | paradigm | <ProjectName>-module.xml. The Module.xml Editor view opens with two tabbed pages: Tree View and XML View. The tree view displays a set of expandable nodes corresponding to the top-level configurable elements in the XML file.
  2. Edit the node items in the tree view as required. See Module.xml Editor Procedures below for instructions.
  3. Upload images for the application as required. See Uploading Images below for instructions.

Module.xml Editor Procedures

Along with editing the attributes associated with elements (or nodes) defined in the module.xml file, you can also define and upload images associated with certain types of elements. In addition, you can add, remove, or reposition the nodes in the Tree View of the editor. Procedures for performing these tasks are provided below.

Adding Nodes to the Tree

To add a node to a tree:

  1. Click the parent node for the new node you want to create.
  2. Click the Add (plus sign) button. A message box indicating the node was added is displayed and the new node is added to the tree. Click OK to dismiss the message.

Editing Node Attributes

To edit node attributes:

  1. Select the node whose attributes you want to edit. Fields for editing the attributes of the selected node appear in the Details (right-hand) pane.
  2. Edit attribute details in the Details pane. Attributes marked with an asterisk ('*') must have a value.
  3. Click Save.
  4. Verify the changes in the XML View page of the editor.

Delete a Node

To delete a node:

  1. Select the node you want to delete.
  2. Click Remove. A message box appears indicating the node was removed. Click OK to dismiss the message.
  3. Verify the operation in XML View page.

Move a Node

To move a node up or down in the node tree, follow these steps:

  1. Select the node you want to move.
  2. Click the Up or Down arrow button to move the node up or down the tree.
  3. Verify the operation in the XML View page.

Uploading Images

An interface for uploading and viewing icon images is available in the Apps Details, Workspace Details, and Task Details panes. See The Image Upload Fields section for a description of the interface, and Defining Space UI Icons in the Module.xml Editor for illustrations that show the different types of icon images you can define in the Module.xml Editor and how they will appear in the Space UI.

This section provides procedural steps for using the Module.xml Editor to define icon image files to use in the application.

To upload an image:

  1. Click Upload to upload the image to a web-specific directory. When you click Upload, a File chooser dialog opens.
  2. Select an image file, such as a PNG, GIF, JPEG, or BMP. The selected image file is copied to a web-specific directory (<Web Project>/web/images/apps).
  3. If the image size is valid, then the image is uploaded. After uploading completes, hovering the mouse over the image preview icon displays the image.
  4. If the image size is invalid, a "Validation Information" message alert appears.
  5. If you click OK, the image will upload but the "Validation Error" icon (reverse-color red 'X') is displayed: