Show TOC

 Using PathsLocate this document in the navigation structure

Use

Using the path determined is the third and final step in using path replacement to dynamically parameterize commands and Web items. You can use the determined path directly in the Web template or as a URL parameter.

Using the Path in Web Templates

Every parameter generally has a value attribute that contains the value of the parameter. If you replace the value attribute with a path attribute with path referencing, you can dynamically assign a new value to the parameter at runtime.

Path referencing cannot be used directly in the layout view or in the Command Wizard. To replace the path, proceed as follows:

  1. Insert the required Web item, or using the Command Wizard, insert the required command into your Web application in the usual way.
  2. Specify all the required parameters for the Web item or command. In particular, you should also specify a value for the parameter to be determined dynamically; this ensures that it appears in the XHTML view.
  3. Switch to the XHTML view of the Web Application Designer.
  4. In the XHTML view, select the Web item or command that you inserted and delete the value attribute for the parameter to be replaced dynamically.
    Tip

    Note the technical name of the parameter in the layout view or in the Command Wizard; this enables you to find the parameter to be replaced more quickly.

  5. Insert the path attribute in place of the value attribute.
  6. Enter the determined path as the value of the path attribute.
Specifying the Path as a URL Parameter

If you want to make a dynamic replacement within a URL parameterization, note that the dynamic parameter is marked with an asterisk (*) and the path is URL-escaped:

  • ':' must be replaced with '%3A'
  • '?' must be replaced with '%3F'
  • '/' must be replaced with '%2F'
  • '@' must be replaced with '%40'
Result
  • You have used the path in the Web template or specified it as a URL parameter. The path is evaluated upon execution; this means the value of a parameter is dynamically passed to a command or Web item.
Example

Example of Using the Path in a Web Template

The text content of a Web item text is to be replaced with a dynamic value (variable 0P_MAT)

Web item without path referencing

<bi:TEXT_ITEM name="TEXT_ITEM_1" designheight="70" designwidth="200" >

<bi:TEXT_BINDING type="CHOICE" value="TEXT_CONTENT" >

<bi:TEXT_CONTENT value="Text..." >" />

</bi:TEXT_BINDING>

</bi:TEXT_ITEM>

Path for value of variable 0P_MAT in data provider DP_1 (single value variable; therefore with index [1])

DATA_PROVIDER:DP_1?/BICS_VIEW/VARIABLES/VARIABLE[@name='0P_MAT']/SELECTIONS/SELECTION[1]/MEMBER/@name

Web item with path referencing

<bi:TEMPLATE_PARAMETERS name="TEMPLATE_PARAMETERS" >

<bi:WEB_TEMPLATE_ACTIONS type="COMPOSITE" >

<bi:ACTION_BEFORE_FIRST_RENDERING type="COMPOSITE" >

<bi:INSTRUCTION >

<bi:SET_ITEM_PARAMETERS >

<bi:cmd_item_parameters type="TEXT_ITEM" >

<bi:TEXT_BINDING type="CHOICE" value="TEXT_CONTENT" >

<bi:TEXT_CONTENT path="DATA_PROVIDER:DP_1?/BICS_VIEW/VARIABLES/VARIABLE[@name='0P_MAT']/SELECTIONS/SELECTION[1]/MEMBER/@name" />

</bi:TEXT_BINDING>

</bi:cmd_item_parameters>

<bi:TARGET_ITEM_REF value="TEXT_ITEM_1" />

</bi:SET_ITEM_PARAMETERS>

</bi:INSTRUCTION>

</bi:ACTION_BEFORE_FIRST_RENDERING>

</bi:WEB_TEMPLATE_ACTIONS>

</bi:TEMPLATE_PARAMETERS>

Example of Using a Path in the URL Parameter

The height of a Web item (not detailed in the example) is to be assigned the height of Web item BUTTON_GROUP_1.

Path

ITEM:BUTTON_GROUP_1?/ITEM/INIT_PARAMETERS/HEIGHT/@value

URL parameter

&HEIGHT*=ITEM%3ABUTTON_GROUP_1%3F%2FITEM%2FINIT_PARAMETERS%2FHEIGHT%2F%40value