Adding a comment to an element

It is possible to attach a comment to any element on the canvas. Studio indicates an element has a comment by placing a yellow note icon in the comment’s upper right corner. If you hover the mouse over that element, then Studio displays the comment in a tooltip.

Add a comment to a PCF element

About this task

If you do one of the following, Studio opens a modal dialog with a text field for the element's comment:

  • Right-click an element and select Edit comment
  • Select the element and then select Edit comment from the Page Config commands on the menu bar

Results

If the element already has a comment, Studio pre-populates the text field with the contents of the comment.

Deleting a comment from a PCF element

About this task

If you do one of the following, Studio deletes the comment for that element:

  • Right-click an element and select Delete comment
  • Select the element and then select Delete comment from the Page Config commands on the menu bar

Results

However, if the element has no comment, Studio disables the Delete comment command.

Disable (comment out) a PCF element

About this task

Commenting out a widget effectively prevents PolicyCenter from rendering the widget in the interface. If you do any of the following, Studio disables the element by surrounding it and its descendants with comment tags in the XML:

  • Right-click an enabled element and select Disable element.
  • Select the element and type CTRL+/.
  • Select Disable element from the Page Config commands on the menu bar.

Results

If the element or any of its descendants have comments, Studio informs you that it is deleting the comments and prompts you to confirm the disable operation.

It is also possible to set the visible attribute on the widget to false to prevent PolicyCenter from rendering the widget. In this case, however, the XML file retains the widget. It still exists server-side at run time, although PolicyCenter does not render it, and the widget does not post data. Thus, commenting out the widget can possibly give you a marginal performance increase. Also, disabling the widget prevents it from causing errors, for example, if the signature of some function called by one of its attributes changes.

As it is the use of XML comment tags that disable the widget, you cannot then add a comment to the widget to describe why you disabled it. If you would like to add an explanation associated with the widget (recommended), then use the widget desc attribute. Studio displays this text in the tooltip if you hover the mouse of over the widget in the PCF editor. (This does not produce a yellow note icon, however.)

Enable a PCF element

About this task

If you do one of the following, Studio enables the element by removing the surrounding comment tags:

  • Right-click a disabled element and select Enable element.
  • Select the element and click Ctrl+/.
  • Select Enable element from the Page Config commands on the menu bar.