Sans Pareil Technologies, Inc.

Key To Your Business

Creating Dialogs




For most cases, we do not need to create classes that handle dialogs. The standard ConfiguredDialog (used by default) implementation is suitable for most common purposes. The following example documents how we can create a dialog for editing properties of a node that we classify as page with title and description properties.
  1. Navigate to the Configuration menu in the admin interface.
  2. Open the modules/books tree.
  3. Create a folder named dialogs under the books node using the New folder menu (or context menu).
  4. Create a folder named pageView under the dialogs folder. (We had referenced this dialog in the Tree Views page in the implementation java class).
  5. Create a content node named details under the pageView folder.
    1. Create a content node named title under the details node.
      1. Add a node data named controlType with value edit under the title content node.
      1. Add a node data named label with value module.books.dialogs.title under the title content node. The value is the key to the localised label to display from the localisation file.
      1. Add a node data named name with value title under the title content node. This is the name of the property that we will be editing.
    1. Add a node data named type with value String under the title content node. This identifies the type of the property in the page node.
    1. Copy the title content node to the parent details content node.
      1. Modify the value of label node data to module.books.dialogs.description.
      1. Modify the value of name node data to description.
  1. Create a content node named metaData under the pageView folder. We can use this to capture meta data (HTML header meta data) for each data node we want.
    1. Copy the title content node from details content node to the metaData content node.
      1. Change the name of the title content node to description.
      1. Modify the value of label node data to module.books.dialogs.metaData.description.
      1. Modify the value of name node data to metaDescription.
    1. Copy the description content node to the parent metaData content node.
      1. Change the name of the description content node to keywords.
      1. Modify the value of label node data to module.books.dialogs.metaData.keywords.
      1. Modify the value of name node data to metaKeywords.
  1. Export the modules/books node and copy into the config/resources/mgnl-bootstrap/books directory in your project.