Connection Types

UIM pages use connections for associating components on a page with actual data. The connection type is reflected in the connection tag name and is roughly equivalent to data direction. The three types of connection available are SOURCE, TARGET and INITIAL (see SOURCE, TARGET, and INITIAL, respectively).

Connection endpoints are further distinguished by the setting of the NAME attribute. The value of this attribute may be the name of the server interface used, TEXT, CONSTANT or PAGE. These values designate objects which supply or consume data. TEXT or CONSTANT can only be used when TARGET has a server interface defined in the ACTION phase.

Figure 1. Connection Types Example
<PAGE PAGE_ID="APage">
  <PAGE_TITLE>
    <CONNECT>
      <SOURCE NAME="TEXT" PROPERTY="Page.Title.Static"/>
    </CONNECT>
  </PAGE_TITLE>

  <SERVER_INTERFACE NAME="DISPLAY_SI"
                    CLASS="sourceClass"
                    OPERATION="read"
                    PHASE="DISPLAY"/>
  <SERVER_INTERFACE NAME="ACTION_SI"
                    CLASS="targetClass"
                    OPERATION="modify"
                    PHASE="ACTION/>

  <PAGE_PARAMETER NAME="P_PARAM"/>

  <CONNECT>
    <SOURCE NAME="CONSTANT"
            PROPERTY="From.Constants.Props"/>
    <TARGET NAME="ACTION_SI"
            PROPERTY="aProperty"/>
  </CONNECT>

  <ACTION_SET BOTTOM="true" TOP="false">
   <ACTION_CONTROL TYPE="SUBMIT" LABEL="Button.Submit">
     <LINK PAGE_ID="APage">
       <CONNECT>
         <SOURCE NAME="DISPLAY_SI" PROPERTY="PARAM"/>
         <TARGET NAME="PAGE" PROPERTY="P_PARAM"/>
       </CONNECT>
     </LINK>
   </ACTION_CONTROL>
  </ACTION_SET>

  <CLUSTER NUM_COLS="1" SHOW_LABELS="false">
    <FIELD LABEL="Label.Text">
      <CONNECT>
        <SOURCE NAME="DISPLAY_SI" PROPERTY="sourceField"/>
      </CONNECT>
      <CONNECT>
        <TARGET NAME="ACTION_SI" PROPERTY="targetField"/>
      </CONNECT>
    </FIELD>
  </CLUSTER>
</PAGE>

Most frequent is a connection to a server interface. Here, the NAME attribute corresponds to an existing (i.e. declared on the page) SERVER_INTERFACE NAME attribute value (DISPLAY_SI and ACTION_SI in the example above).

A value of TEXT means data is sourced from a properties file. The PROPERTY attribute in this case contains the name of an externalized string in a page-specific property file. In the example, the file APage.uim has a page title which references the Page.Title.Static property in the associated APage.properties file.

A value of CONSTANT provides similar functionality to TEXT but the externalized string is component-specific rather than page-specific and is sourced from a file called Constants.properties. In the example, there is a page level connection to a From.Constants.Props property.

A connection might also source its data from a page parameter (i.e., a variable declared on a page, P_PARAM in the example). In this case PAGE is used as the value of the NAME attribute.

There are limitations and restrictions on the use of the various connection types in various contexts. The UIM element descriptions below detail these limitations where they arise.