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.
  • Navigate to the Configuration menu in the admin interface.
  • Open the modules/books tree.
  • Create a folder named dialogs under the books node using the New folder menu (or context menu).
  • Create a folder named pageView under the dialogs folder. (We had referenced this dialog in the Tree Views page in the implementation java class).
  • Create a content node named details under the pageView folder.
    • Create a content node named title under the details node.
      • Add a node data named controlType with value edit under the title content node.
      • 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.
      • 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.
    • 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.
    • Copy the title content node to the parent details content node.
      • Modify the value of label node data to module.books.dialogs.description.
      • Modify the value of name node data to description.
  • 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.
    • Copy the title content node from details content node to the metaData content node.
      • Change the name of the title content node to description.
      • Modify the value of label node data to module.books.dialogs.metaData.description.
      • Modify the value of name node data to metaDescription.
    • Copy the description content node to the parent metaData content node.
      • Change the name of the description content node to keywords.
      • Modify the value of label node data to module.books.dialogs.metaData.keywords.
      • Modify the value of name node data to metaKeywords.
  • Export the modules/books node and copy into the config/resources/mgnl-bootstrap/books directory in your project.