Runner Technologies Home
» Orbit Home » Build Transactional Pages » Attaching Sections and Queries

 Attaching Sections and Queries to a Page

  One of the most useful and powerful features of Orbit is the concept of reusability. This important feature allows you to reuse Orbit components throughout your application enhancing the readability and consistency of your code.

An Orbit application is a collection of several dynamic and static HTML pages. Consequently, Orbit pages are broken down into sections, queries, and tokens. These components may be attached to different pages to maintain consistency and avoid "reinventing the wheel".

 How to Attach Sections to Pages

  1. Let's open your Orbit development environment and select TEMPLATE from the application drop down list.
  2. Search for MY_PAGE and click the "Pages" link. The Page Search page should display on your right frame with the results of your query.
  3. Click on the Page Code link to drilldown into MY_PAGE.

  1. We are ready to add sections to your page. You may either create a new section by clicking the new icon link or select from an existing list of sections by clicking on the list of values icon . For this tutorial we will add and existing section.
  2. Clicking on the list of values icon will open a pop up search window, simply type the section code or description to query results. If you do not know the section code or description, or are not sure of it, simply do a wildcard search.
  3. We are going to add 3 sections to MY_PAGE, a header, body and a footer section. These sections already exists in the TEMPLATE application, so let’s search for the correct section code by searching for head%, then clicking the Select link to attached the desire section.

Note: At this point, the SECTION LIST pop up window will self-close and the section code will be added to MY_PAGE.

  1. Continue on to the next input field and repeat step 6. Search for body and select the resulting section.
  2. Repeat step 7 one more time. This time search for f%, select the section named FOOTER.
  3. Back on MY_PAGE, lets go ahead and save it.

  1. Finally to preview your page, click the Preview icon one more time and you should see a page similar to the image below.

  You may add as many sections as your page requires. By default, the sort order field is pre-filled for you and is what determines the display order of the sections on a page. However, you may want to rearrange the order in which sections display to satisfy the layout of your page.

 How to Attach Queries to Sections

  1. Following the same concept of attaching sections to pages, follow steps 1 thru 3 from the previous section.
  2. Drill into the MY_PAGE record and click the Edit icon  to the left of the section code named BODY.
  3. Scroll Down to Section Queries and proceed to follow step 4 from the “attach a section” tutorial.
  4. Click on the “list of values” icon and search for a query code BODY_QUERY and select it. This will bring you back to the Section Maintenance screen where you will see the code selected attached to the Section Queries List. Similar to the section list in the page maintenance screen, notice the sort order fields, inactive and delete checkboxes. A query may be inactivated or removed from the section. In addition, a section may have more than one query attach to it. The sort order determines the order in which each query will execute.
  5. Finally, go ahead and save the record to add the section-query relationship to this record.

Important: Notice the Section Type drop down on the top portion of the Section Maintenance Page.
This is a required field that must be set depending on the nature of your section. If your section has a query attach to it that will result into more than 1 record, you must select R – Repeater Section (R) from the drop down. This will indicate to the Orbit engine that this section must repeat itself for each record returned by the query. On the other hand, if your query is matching an exact record, therefore returning only 1 result, the section type does not affect your query result.
  1. Go back to the MY_PAGE maintenance screen and click on the preview icon to view the updated page. You should see a page similar to the image below:

 CLEAN_Address 3.5
 SurveyDIG 2.0
 SalesOE 2.0
 MentorPRO 2.0
 Orbit Track 5.0
 Orbit 5.1
Copyright © 1997-2005 Runner Technologies, Inc. All rights reserved.