Placeholder Control
The Placeholder Control enables you to add a control template to a page as well as to a control template itself. See the section Control Templates for information about how to work with control templates and Placeholder Controls.
•To reset a style or property (in the Styles & Properties Pane), select the property and click Reset in the pane's toolbar. •To edit the XPath expression of a style or property (in the Styles & Properties Pane), select the style or property, and click Edit XPath in the pane's toolbar. •To copy a control to another location in the design, press Ctrl and drag-and-drop the control to the desired copy location. |
Placeholder Control events
There is no event associated with the Placeholder Control.
Placeholder Control properties
The control's properties are available in the Styles & Properties Pane, and are listed below in the order in which they appear.
The name is used to reference the control from elsewhere in the page or project. Double-click inside the value field to edit.
|
Click the Additional Dialog button to display the control's Actions dialog. You can set actions to perform when a control event is triggered. The control's event/s are predefined and each is shown in its own tab in the right-hand pane of the Actions dialog. A library of actions is displayed in the left-hand pane. You can drag an action from the left-hand pane into an event's tab and then define the properties of the action. For each event, multiple actions can be set up. They will be executed in the order in which they occur, from top to bottom.
After defining a control's actions, you can access and edit them at any time by clicking the property's Additional Dialog button. Alternatively, you can access a control event by right-clicking the control and selecting the control's event in the context menu that appears.
|
An XPath expression that should evaluate to true() or false(). If the expression evaluates to false()—and only if it evaluates to false()—then the control is not visible. If the expression evaluates to true() or returns some other value, then the control is visible. The default is true(). Double-click inside the value field, or click the XPath button, to enter or edit an XPath expression. The Visible property can be used to render an object visible or not depending upon whether an XPath expression evaluates to true(). As a result, the display of an object can be made to be dynamically dependent on the content or structure of data.
Note: For information about the visibility of spanned columns/rows, see Table Properties.
Note: The $MTControlValue variable is not available for the evaluation of the Visible property. If it is used, then a validation error results.
|
Selects the control template that this Placeholder Control instantiates. The dropdown list of the property's value field displays all the control templates that have been defined in the design till this time. Alternatively, you can use an XPath expression to select a control template. Such an XPath expression must evaluate to the name of a control template in the design. Using XPath expressions enables you to select templates conditionally. See Example Projects for ways to do this. When you select a control template, its parameters are displayed as sub-properties of the Control Template property (see screenshot below). Enter XPath expressions to select or generate the values of the parameters. The context node of the expressions will be the context node of the Placeholder Control when the control is processed. The context node for the evaluation of parameters and variables is not changed by the Control XPath Context property (see below).
If you select a control template via an XPath expression, then the control template is not selected till runtime, when the expression is evaluated. Since the control template is not known at design time, no parameters can be displayed in the pane. Instead of a list of parameters, a property named Template Parameters is available. You can enter an XPath expression to generate the values of the expected parameters. The expression must be either an array expression or map expression. If you use an array expression, the parameter values must be provided in the same sequence as the parameter definition order in the control template; additionally any optional parameters must not be omitted. See Example Projects for a sample of such expressions.
|
The Template Parameters property provides the parameter values for the control template selected in the Placeholder control's Control Template property.
For the Template Parameters property, you can enter an XPath expression to generate the values of the expected parameters. The XPath expression must be either an array expression or a map expression. If you use an array expression, the parameter values must be provided in the same sequence as the parameter definition order in the control template; additionally any optional parameters must not be omitted. (In the case of maps, the keys of the map enable the values to be correctly assigned.) See Control Templates Example Projects for a sample of such expressions.
|
This property is used to change the context node of XPath expressions that are evaluated in the control template that the Placeholder Control instantiates. The instantiated control template is the template named in the Control Template property (see above).
Note the following points:
•XPath expressions for the values of template parameters are evaluated in the context of the Placeholder Control's context node—not the changed context node. •XPath expressions that generate the values of template variables, however, will be evaluated in the context specified by this property (Control XPath Context). If no value is set for this property, then values of variables are also evaluated using the Placeholder Control's context node.
|