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:
- Create a profile. For more information,
see Rational Rhapsody online Help.
- Create a table or matrix layout and design
it as you want. See Creating table layouts and Creating matrix layouts.
- 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.
- 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.
- Create a table or matrix view through the
profile, select .
- 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).
- Complete your design of the view by entering
the Scope fields, as shown in the following figure, and click OK.
- 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 ):
- 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.