Example

Example details an example application, which would be stored in a file called SimpleApp.app.

Figure 1. Simple.app
<?xml version="1.0" encoding="UTF-8"?>
<ac:application
   id="SimpleApp"
   logo="SimpleApp.logo"
   title="SimpleApp.title"
   subtitle="SimpleApp.subtitle"
   user-message="SimpleApp.UserMessage">

  <ac:application-menu>
    <ac:preferences title="preferences.title"/>
    <ac:help title="help.title"/>
    <ac:logout title="logout.title"/>
  </ac:application-menu>

  <ac:application-search>
    <ac:search-pages>
      <ac:search-page type="SAS01"
        description="Search.Person.LastName.Description"
        page-id="Person_searchResolver"
        initial-text="Search.Person.LastName.InitialText"
        default="true"/>
      <ac:search-page type="SAS02"
        description="Search.Person.Gender.Description"
        page-id="Person_listByGender"
        initial-text="Search.Person.Gender.InitialText" />
    </ac:search-pages>
    <ac:further-options-link
       description="Search.Further.Options.Link.Description"
       page-id="Person_search" />
  </ac:application-search>

  <ac:section-ref id="SimpleHomeSection"/>
  <ac:section-ref id="SimpleWorkspaceSection"/>

</ac:application>
Note: In the above example a namespace, ac has been declared and all elements are prefixed with the namespace. This is recommended practice. Consult Application Configuration Files for more information.

The SimpleApp.app should have a corresponding SimpleApp.properties file, which details the localizable content. For example:

SimpleApp.logo=CDEJ/themes/v6/images/application-logo.png
SimpleApp.title=Cúram
SimpleApp.subtitle=Simple Application
SimpleApp.UserMessage=Welcome, %user-full-name

preferences.title=User Preference
help.title=Help
logout.title=Logout
Search.Person.LastName.Description=Surname
Search.Person.LastName.InitialText=Enter surname to search for
Search.Person.Gender.Description=Gender
Search.Person.Gender.InitialText=Enter gender to search for
Search.Further.Options.Link.Description=Advanced Search

In the above example, the Cúram logo image is referencing the default logo image shipped with the Cúram Client Development Environment (CDEJ). A custom logo can be added to the Images folder in the component and referenced directly as Images/my-custom-logo.png.

Note: In the properties file for the SimpleApp.app example, the ú in Cúram is added using the Unicode escape sequence. An alternative approach is to add the ú directly and ensure the file is saved in the UTF-8 format. Both approaches are supported for the application configuration files.