Setting up an initial layout for table and matrix views

You can bind a view and layout for a table or matrix through the use of a New Term stereotype that has the Model::Stereotype::InitialLayoutForTables property set for this purpose for a Rational® Rhapsody® profile. Once you apply the stereotype to a table or matrix layout, you can set the initial layout for a table or matrix view.

Procedure

To apply a stereotype to a table or matrix layout for a profile:

  1. Create a profile. For more information, see Rational Rhapsody online Help.
  2. Create a table or matrix layout and design it as you want. See Creating table layouts and Creating matrix layouts.
  3. In your profile, create a stereotype and define it as a New Term and to what it is applicable to (table view or matrix view, as shown in the following figure) and click Apply to save but not close the window.
    Features window for stereotype defined as new term and applicable to matrix view
  4. On the Properties tab, locate the Model::Stereotype::InitialLayoutForTables property and enter the name of the layout you created in Step 2 and click OK.
  5. Create a table or matrix view through the profile, select Add New > name of profile > matrix view.
  6. Open the Features window for the table or matrix view you created in the previous step and note that the layout is already identified (because of the applicable stereotype).
  7. Complete your design of the view by entering the Scope fields, as shown in the following figure, and click OK.
    Features window for matrix view showing From scope and To scope
  8. Look at the Rational Rhapsody browser and notice that the view you just created is listed in a View category (in our example, MyMatrixViewStereotypes, as shown in the following figure) other than the general Matrix Views category, which only lists those views that were created without a stereotype (using Add New > Table\Matrix > Matrix View):
    Browser showing matrix views
  9. When you double‑click the table or matrix view (MyMatrixView in the example), it shows the query results from the layout that has the specified stereotype.

Feedback