Back Forward Page-New method

Methods and instructions by function

Use the Page-New method to create a page on the clipboard. The new page may be a top-level page or an embedded page. 9/6/02 TURBT

You can identify a model to initialize the newly created page. The model can set values for one or more properties.

CautionExcept in rare cases, identify in the Step Page field the name of the page to be created by this method. If the Step Page field of the step is blank, this method clears the primary page of the current activity and may change its class. This often is undesirable. BERRB 11/1/06

NoteUse the Apply-Model method, not the Page-New method, to apply a model rule to an existing page.

Parameters

Identify the name of the page in the Step Page column of the step. Choose a valid page name. See Understanding page names and reserved pages.

This method has three parameters:

Parameter

Description

Model

Optional. Enter a model (an instance of the Rule-Obj-Model rule type) to apply to the new page. Identify a model in a class that is the same as, or a superclass of, the class of the new page.

PageList

Optional. To save the name of the new page as the final element in a list, identify a Value List property (not a Page List property). Use the notation pagename.propertyname.

The system appends the name of the new page as the value of the last element of the Value List property. TURBT 11/20/02

NewClass

Optional. Identify a class — in most cases concrete class — for the new page. CLINB Q-104 11/12/02 Enter the keyword $NONE to create a classless page. R-6610 12/12/02

If left blank, the system creates the new page using the class of the page specified in the Step Page column of the activity step being executed. (It retrieves the class of this page from the array entered in the Pages & Classes tab of the Activity form.)

If the Step Page field is also blank, the system creates the new page of the class that is the first key part of the current activity.

NoteThe following keywords mean different things in other parts of Process Commander. Using them as a page name is not recommended: param, local, primary, steppage, mysteppage, top, parent, or <current>.

The following names and patterns are not valid: pxNode, pxRequestor, pxThread, locate* prompt*, $*, px*, pz*, or py*.

To avoid potential confusion, don't use Declare_ as the initial portion of a page name. The system creates declarative pages with such names.

Results

The system creates a new page as specified, using the name in the Step Page column of the step. It finds the model using rule resolution and applies it to initialize the contents of the new page.

CautionPage names are unique within the clipboard. If another page with the new name is already present, the system deletes that page and adds the new page with that name. OSMAE 9/10/07

Checking the method status

This method updates the pxMethodStatus property. See How to Test method results using a transition.

To avoid overwriting an existing page

R-8710 You may want the activity to check whether a page with a certain name exists before you open a new page.

In the activity step's precondition, enter the following:

= @PageExists("myPage", tools)

where myPage is the name of the clipboard page.

Restrictions

B-11491 This method cannot be used in a step that involves iteration. This method cannot be used to create a declarative page.

definitions declarative page, primary page, step page
related topics Understanding page names and reserved pages
Apply-Model method

UpMethods and instructions by function