Guide to Applications
Test Your Knowledge
Task: Create an Application to Attach to Pages
- Create the tree definition file “TestApps.xml”.
- Set up the application so that users can attach it to pages manually (“Composite.Data.Types.IPage”).
- Set its name to “Test Apps”.
- Select a page in “Content” and check for “Add application” in its context menu.
- Click “Add application” and check for “Test Apps” to appear on the list.
Task: Attach a Message Box to Pages
- Edit “TestApps.xml”.
- Set up the application to auto-attach to pages.
- Add the message box action to the root element of the tree structure.
- Set its label, title and message to “Hello World”.
- Select a page in “Content” and check for the “Hello World” button on the toolbar.
- Click the button and check for the message box.
Task: Attach the Application to Its Own Perspective
- Edit “TestApps.xml”.
- Set up the application to auto-attach to its own perspective.
- Add a simple element to the application tree structure with the label “Contacts” and ID “ContactsPerspective”.
- Insert another simple element in the “Contacts” element with the label “Contacts” and ID “ContactsTree”.
- Grant permissions to the new perspective in “Users”
- Check for the new perspective and the “Contacts” element in it.
Task: Retrieve Data Elements from a Data Type
- Create the data type “Test.Contacts” and add fields: “Name” (string), “Company” (string) and “Country” (string).
- Add five or more contacts to the data type only using either “CompanyA” or “CompanyB” and “US” and “Denmark”.
- Edit “TestApps.xml”.
- As a child of the “Contacts” element, add the element that retrieves its data items from the “Test.Contacts” data type.
- Check for the items in the “Contacts” perspective.
- Edit “TestApps.xml”.
- Within the “Contacts” element with the ID of ”ContactsTree”, insert the data folders element that group the “Test.Contacts” data items by the “Company” field.
- Move the “Test.Contacts” data elements into the data folders element.
- Check for the data folders that group data items in the “Contacts” perspective by “Company”.
- Edit “TestApps.xml”.
- Sort the “Test.Contacts” data elements by “Name” in descending order.
- Check for the sorting order of data elements in the “Contacts” perspective.
- Edit “TestApps.xml”.
- Filter data elements by “Country” only selecting contacts from Denmark.
- Check for the contacts now present in the “Contacts” perspective.
Hint: To hide empty parent elements (data folders) unless they have child elements (data elements), set the Display attribute on the former to “Compact”.
Task: Attach Data Actions to Elements
- Edit “TestApps.xml”.
- Within the simple “Contacts” elements with the ID of “ContatcsTree”, insert an action to add data items of the “Test.Contacts” type. Set its label to “Add Contact”.
- Repeat Step 2 within the data folders element with “Company” as its grouping field.
- Within the data elements of the “Test.Contacts” type, insert actions to edit and delete data items. Set its labels to “Edit Contact” and “Delete Contact”.
- In the “Contacts” perspective, Check for the buttons when selecting the “Contacts” element, a grouping data folder element, a data item.
- Add, edit and delete data items.
- Create an ASPX file with simple content in the root of the website.
- Edit “TestApps.xml”.
- Within the simple “Contacts” elements with the ID of “ContactsTree”, add an action to open this ASPX file in the view.
- Set its label to “Open Page”.
- In the “Contacts” perspective, check for the “Open Page” button.
- Click the button and check the result.
- Create an XSLT function that outputs simple XHTML.
- Edit “TestApps.xml”.
- Within the simple “Contacts” elements with the ID of “ContactsTree”, add an action to execute the XSLT function.
- Set its label to “Execute Function”.
- In the “Contacts” perspective, check for the “Execute Function” button.
- Click the button and check the result.